Jump to content

Source Code of the JS "Engine" for Triggers


heyalex
 Share

Recommended Posts

While looking through the triggers example, "Treasure Island", I noticed some "object" was being used. This object holds the default triggers that can be built upon during the game. I'm trying to find this object so I can learn all its triggers, and possibly make modifications to it allow its expansion, but I'm having trouble find the object. I've "grep" the source code and checked documentations but am unable to find it anywheres. I understand that, http://trac.wildfiregames.com/wiki/Triggers, holds a reference table to the triggers for "Engine" but I want to see if theres more. Thanks.

Link to comment
Share on other sites

I recall you asked for the location of Engine functions on irc too.

Engine.foo() functions are defined in cpp files, mostly ScriptFunctions.cpp and JSInterface_foo.cpp.

Engine.QueryInterface(SYSTEM_ENTITY, IID_Trigger) gets the system component like the Trigger one.
Engine.QueryInterface(this.entity, IID_Attack) gets a component that a specific entity / unit with that ID has, here the Attack component.
Most components are defined in http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/ as sanderd17 mentioned, some others are defined in C++. (like the pathfinder).

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...