• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

In Need of triggering help

Status
Not open for further replies.
Level 5
Joined
Jul 13, 2010
Messages
84
Hello! I am in great need. I need to make a series of triggers so that if this unit is captured before the end of the timer, that certain heroes gain levels. IF the unit is not captured than other heroes get levels. I also need it so that if the unit is captured the event ends. How can I go about doing this? Thank you for your help so far hive!

=)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
Break it down into individual parts and code them up.

You will need an initialization part (to start the sequence).
You will need a timer part (which runs when the time elapses).
You will need a part to handle the capturing of the unit (you did not state how capture works).

The initializer runs when you want this sequence to begin (unclear from problem specification). This basically starts the timer, creates the unit and gets everything going.

The timed part runs when the timer expires and goes through all the heroes of one side (probably stored in a group) and gives them a level. It obviously removes the unit and cleans up (removing timer etc).

The capture part runs when the unit should be captured (not specified in the problem specification). It loops through the all heroes of the other side (probably stored in a group) and gives them a level. It obviously removes the unit and cleans up (removing timer etc).

You could probably combine the cleanup into a single function instead of duplicating the code to make maintence easier.
 
Status
Not open for further replies.
Top