Running a Script When Player Lights Candle On - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Running a Script When Player Lights Candle On (/thread-15428.html) |
Running a Script When Player Lights Candle On - SonOfLiberty796 - 05-15-2012 Hey guys, I need to know how to run a script once the player lights up ("tinderboxes" the lamp :p) a candle. So let's say if the player lit up a candle in a room, and once he does that, it unlocks a secret passage (just an example of what I mean). Please and thank you RE: Running a Script When Player Lights Candle On - FragdaddyXXL - 05-15-2012 void SetEntityCallbackFunc(string& asName, string& asCallback); Calls a function when the player interacts with a certain entity. Callback syntax: void MyFunc(string &in asEntity, string &in type) Type depends on entity type and includes: “OnPickup”, “Break”, “OnIgnite”, etc RE: Running a Script When Player Lights Candle On - SonOfLiberty796 - 05-15-2012 (05-15-2012, 12:38 AM)FragdaddyXXL Wrote: void SetEntityCallbackFunc(string& asName, string& asCallback);Ahhhh I thought it was that function! I must of missed the "OnIgnite" part. Thank you very much sir |