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
Code help: Trigger when lit
The worst submarine Offline
Junior Member

Posts: 11
Threads: 2
Joined: Oct 2010
Reputation: 0
#8
RE: Code help: Trigger when lit

(10-03-2010, 03:19 AM)Entih Wrote: Candles actually have an option in their entity options called CallbackFunc, and one of the Types it can function as is 'OnIgnite', much easier with much less inventory checking. Basically, you define a function name for it to point to, for example I tested it with 'testignite' as the function name. Then, in your script, you have something like this:

void testignite(string &in EntityName, string &in Type)
{
    if(Type == "OnIgnite")
    {
        AddDebugMessage("Ignited_callback_scare", false);
        PlaySoundAtEntity("rawr", "guardian_ontop.snt", "Player", 0.0f, false);
    }
}

In that fully functional sample, when the candle is ignited with a tinderbox, it sends out a debug message and a scary sound.
I finally got the code working, and then I decided to come back and say that I'd finished. Now I find a much, much easier way to do what I've done! Haha. Thanks, I'll definitely replace my code with this. Much less loopholes.
10-03-2010, 03:27 AM
Find


Messages In This Thread
RE: Code help: Trigger when lit - by HakePT - 10-02-2010, 09:38 PM
RE: Code help: Trigger when lit - by Jordo76 - 10-02-2010, 09:46 PM
RE: Code help: Trigger when lit - by Noj - 10-02-2010, 11:15 PM
RE: Code help: Trigger when lit - by Entih - 10-03-2010, 03:19 AM
RE: Code help: Trigger when lit - by The worst submarine - 10-03-2010, 03:27 AM



Users browsing this thread: 1 Guest(s)