Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to reverse tinderbox ignite mechanic?
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#4
RE: How to reverse tinderbox ignite mechanic?

You should be able to perform:
void SetEntityCallbackFunc(string& asName, string& asCallback);
On each light source. Specify the callback function as follows:

void cbIgnoreIgnite(string &in asEntity, string &in type)
{
  AddDebugMessage(asEntity " callback: " + type,false);
  if(type == "OnIgnite")
  {

  }
}
To let you capture the ignite event in code.

You could then create custom light entities, which have the lights + effects on by default, and then use the above approach to turn them off when they become lit. E.g.:
void cbIgnoreIgnite(string &in asEntity, string &in type)
{
  AddDebugMessage(asEntity " callback: " + type,false);
  if(type == "OnIgnite")
  {
    //Ignite event triggered -> turn off the light
    SetLightVisible(asEntity + "_Light_1",false);
    DestroyParticleSystem(asEntity + "_Some_Entity_Particle_System");
    //Or you could replace the light entity with an off version of the entity using the new ReplaceProp function
  }
}
(This post was last modified: 10-06-2013, 03:21 PM by Apjjm.)
10-06-2013, 03:15 PM
Find


Messages In This Thread
RE: How to reverse tinderbox ignite mechanic? - by Apjjm - 10-06-2013, 03:15 PM



Users browsing this thread: 1 Guest(s)