Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved Running a Script When Player Lights Candle On
Author Message
SonOfLiberty796 Offline
Senior Member

Posts: 369
Joined: Aug 2011
Reputation: 2
Post: #1
Running a Script When Player Lights Candle On
Hey guys,

I need to know how to run a script once the player lights up ("tinderboxes" the lamp Tongue) 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 Smile
(This post was last modified: 05-15-2012 12:43 AM by SonOfLiberty796.)
05-15-2012 12:35 AM
Find all posts by this user Quote this message in a reply
FragdaddyXXL Offline
Member

Posts: 133
Joined: Apr 2012
Reputation: 7
Post: #2
RE: Running a Script When Player Lights Candle On
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

Use gamefront. No pop-ups. :D
Dark Seclusion Here
C++/C# Programmer
05-15-2012 12:38 AM
Find all posts by this user Quote this message in a reply
SonOfLiberty796 Offline
Senior Member

Posts: 369
Joined: Aug 2011
Reputation: 2
Post: #3
RE: Running a Script When Player Lights Candle On
(05-15-2012 12:38 AM)FragdaddyXXL Wrote:  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
Ahhhh I thought it was that function! I must of missed the "OnIgnite" part. Thank you very much sir Smile
05-15-2012 12:43 AM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)