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

Need good reviving with...

Status
Not open for further replies.
Level 14
Joined
Nov 4, 2006
Messages
1,241
  • Events
    • Unit - A Unit dies
  • Conditions
    • triggering Unit is a Hero equal to true
  • Actions
    • Wait ((Real((Level of (Triggering unit))))x2.5) seconds
    • Hero - Revive triggering Unit at (owner of triggering Unit) starting position

fixed the "dying unit" mistake
 
Last edited:
Level 5
Joined
Jan 3, 2008
Messages
164
What you have wrote there is not MUI, you need to store the dieing unit in a variable before the "wait" action. You could also do this with a timer, which would look much better and actually tell the person when he will be revived.
 
Level 6
Joined
Mar 15, 2005
Messages
112
  • Events
  • Unit - A Unit dies
  • Conditions
  • triggering Unit is a Hero equal to true
  • Actions
  • Wait ((Real((Level of (Triggering unit))))x2.5) seconds
  • Hero - Revive Triggering Unit at (owner of triggering Unit) starting position
Just don't use dying unit. Triggering unit is local so the above is MUI. Don't give me any credit I just changed one word of UreDe4D's suggestion.
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
yeah sorry i wanted to write triggering unit, but forgot about it, Waits usually cause problems but not if you only use triggering unit and as IncubiProtocoL already said, its completely MUI then. actually, if you store the dying unit in a variable it wouldn't be MUI any more, cause the variable would be changed if another unit dies during the revive time and the last died unit would be revived instead
 
Level 6
Joined
Mar 15, 2005
Messages
112
I'm pretty sure someone around this section said that wait actions suck heavily..

A couple problems with waits. Global variables can change during a wait. They can be inefficient on b.net. You can safely set local variables before wait actions to keep it MUI.
Example:

JASS:
local unit U = GetLastCreatedUnit()
call PolledWait(5.00)
call KillUnit(U)
set U = null
 
Status
Not open for further replies.
Top