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?
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#6
RE: How to reverse tinderbox ignite mechanic?

(10-06-2013, 03:15 PM)Apjjm Wrote: 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
  }
}

I got the particle system, billboard and light to remove but the internal particle of the candle itself still ignites. Guess I'll have to make a copy and remove it myself for my game. Thank you for the help!!! +1

-Grind to the Gore-
(This post was last modified: 10-06-2013, 07:47 PM by GoreGrinder99.)
10-06-2013, 06:29 PM
Find


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



Users browsing this thread: 1 Guest(s)