Frictional Games Forum (read-only)
"Puzzle" help - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: "Puzzle" help (/thread-11011.html)



"Puzzle" help - Dobbydoo - 10-27-2011

How can I make it so that when I have lit four special candles something will happen(In my case a monster despawning)?



RE: "Puzzle" help - Russ Money - 10-27-2011

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#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.



RE: "Puzzle" help - Dobbydoo - 10-27-2011

(10-27-2011, 08:28 PM)Russ Money Wrote: http://wiki.frictionalgames.com/hpl2/amnesia/script_functions#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




RE: "Puzzle" help - Dobbydoo - 10-28-2011

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?



RE: "Puzzle" help - Your Computer - 10-28-2011

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


RE: "Puzzle" help - Dobbydoo - 10-29-2011

(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