• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,232
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