• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] fast question

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,288
hi, I just run into a possible problem.
if I do the following
  • Actions
    • Unit - Create 1 Troll Lord for Neutral Hostile at (Center of Region 010 <gen>) facing Default building facing degrees
    • Unit - Add a 90.00 second Generic expiration timer to (Last created unit)
(ignore the leak ty)

and then I want to give gold to the player who kills this unit. However what happens if the unit dies by the timer I put? Would that count as player passive killed him or what?
 
I can think of 2 potential ways

The first way would be to check if the owner of killing unit == null I'm not sure that works though.

The other way would be to index all the units you want having an "expiration timer" and count down in a periodic trigger and when their timed life should end you just kill them that way, thereby easily detecting when the unit expired rather than was killed.
 
Status
Not open for further replies.
Back
Top