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
"Puzzle" help
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#1
"Puzzle" help

How can I make it so that when I have lit four special candles something will happen(In my case a monster despawning)?
10-27-2011, 08:11 PM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#2
RE: "Puzzle" help

http://wiki.frictionalgames.com/hpl2/amn...#variables

You'll want to set up a global or local variable and set it to 0. When you light a candle, +1 to the variable. When the variable equals 4, make the active monster entity set to false.

10-27-2011, 08:28 PM
Find
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#3
RE: "Puzzle" help

(10-27-2011, 08:28 PM)Russ Money Wrote: http://wiki.frictionalgames.com/hpl2/amn...#variables

You'll want to set up a global or local variable and set it to 0. When you light a candle, +1 to the variable. When the variable equals 4, make the active monster entity set to false.
Ah, thank you for your help and quick response Smile

10-27-2011, 08:41 PM
Find
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#4
RE: "Puzzle" help

Uhm... I've been trying to get it to work, but I don't entirely understand variables. What do I have to do to make the candles add one to the variable, and how do I make it register it when it reaches 4?
10-28-2011, 08:36 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: "Puzzle" help

(10-28-2011, 08:36 PM)Dobbydoo Wrote: Uhm... I've been trying to get it to work, but I don't entirely understand variables. What do I have to do to make the candles add one to the variable, and how do I make it register it when it reaches 4?

You would use the SetEntityCallbackFunc function to set a callback on the candles, and if "OnIgnite", then add 1 to the local (or global) variable.

Tutorials: From Noob to Pro
10-28-2011, 10:18 PM
Website Find
Dobbydoo Offline
Member

Posts: 50
Threads: 6
Joined: Aug 2011
Reputation: 0
#6
RE: "Puzzle" help

(10-28-2011, 10:18 PM)Your Computer Wrote:
(10-28-2011, 08:36 PM)Dobbydoo Wrote: Uhm... I've been trying to get it to work, but I don't entirely understand variables. What do I have to do to make the candles add one to the variable, and how do I make it register it when it reaches 4?

You would use the SetEntityCallbackFunc function to set a callback on the candles, and if "OnIgnite", then add 1 to the local (or global) variable.
Thank you so much! I finally got it working now Big Grin


10-29-2011, 08:43 AM
Find




Users browsing this thread: 2 Guest(s)