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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...