Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Puzzle" help
Author Message
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Russ Money Offline
Senior Member

Posts: 360
Joined: Dec 2010
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Dobbydoo Offline
Member

Posts: 50
Joined: Aug 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: