Frictional Games Forum (read-only)

Full Version: "Puzzle" help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I make it so that when I have lit four special candles something will happen(In my case a monster despawning)?
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)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

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)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.
(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