10-27-2011, 08:11 PM
10-27-2011, 08:28 PM
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.
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:41 PM
(10-27-2011, 08:28 PM)Russ Money Wrote: [ -> ]http://wiki.frictionalgames.com/hpl2/amn...#variablesAh, thank you for your help and quick response
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-28-2011, 08:36 PM
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, 10:18 PM
(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-29-2011, 08:43 AM
(10-28-2011, 10:18 PM)Your Computer Wrote: [ -> ]Thank you so much! I finally got it working now(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.