[epiar-devel] Console/Missions

Felix nutomic at live.de
Fri Sep 9 13:07:29 PDT 2011


Thanks, that really helped my a lot.

Problem is, I can't do the quotes on my german keyboard (checked all 
keys, even managed to crash the game with some öäü btw). I guess I have 
to wait with this until copy/paste or localization is implemented.

On 09.09.2011 04:28, Matthew Zweig wrote:
> The console is really just a direct interface to the Lua interpreter.  You can do anything from there that you can do with a Lua script.
>
> Here's how I approached this problem:
>
> Grepping the source files for "Mission" and see where missions are used.
> 	The Missions are used in missions.lua.  This seems obvious.  These are the mission definitions and steps in the Mission.
> 	The Missions are used in landing.lua .  This is related to accepting new missions.
> 	The Missions are used in player.lua.  Now we're getting somewhere.  The "Missions Tab" of the player's Information Window (Hit 'i' during gameplay) shows all the players's current missions.  From here, you can view each mission's description.
>
> In each mission description we see a button "Abort" that when clicked executes the string:
> 	string.format("PLAYER:RejectMission(%q); UI.search(\"/Window'Mission Description'/\"):close()", _missionName)
>
> Extacting the useful bit, we see that you can have the player abort (or reject) a mission named "The Stone Revolution Artifacts" via the console with:
>
>
> 	PLAYER:RejectMission("The Stone Revolution Artifacts")
>
>
>
> For reference, you could check out:
> 	http://epiar.net/trac/wiki/MissionCreation
> 	http://epiar.net/trac/wiki/MissionLifetime
> To learn more abut how the missions are structured.
>
> Regarding that actual bug, I suggest something similar to what we do when a ship explodes:
>
> 	Sound *explodesnd = Sound::Get("Resources/Audio/Effects/18384__inferno__largex.wav.ogg");
> 	explodesnd->Play( GetWorldPosition() - camera->GetFocusCoordinate());
>
> Except that the code should be in Mission::RunFunction near the mission completion checks.
>
> In this case, the Sound::Get will get a static copy of the Sound, rather than a dynamic copy.  This way you don't have to reload the sound every time.
>
>
>
> Also, great list of new bugs to trac(k).  I'll be sure to comment on each one to help.
>
> Thanks,
> ~Matt
>
> On Sep 8, 2011, at 5:28 PM, Felix wrote:
>
>> Hi,
>> I am currently implementing http://epiar.net/trac/ticket/130, and need
>> help with the console for testing. Can anyone tell me how I can force to
>> finish/fail a mission via console?
>>
>> I think a documentation for the console would also be good in the long run.
>> _______________________________________________
>> epiar-devel mailing list
>> epiar-devel at epiar.net
>> http://epiar.net/mailman/listinfo/epiar-devel
>
> _______________________________________________
> epiar-devel mailing list
> epiar-devel at epiar.net
> http://epiar.net/mailman/listinfo/epiar-devel
>
>



More information about the epiar-devel mailing list