• 🏆 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!

For some reason, i cant get this to work....

Status
Not open for further replies.
Level 6
Joined
Mar 29, 2004
Messages
222
theres a certain unit on my map that wont revive, even when the triggers say it should. and for every other unit that dies that is not of the same type, the timers and reviving work, why?

Here are the triggers for the units abilitys ect.

Player 1's Revival
Hero Dies
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Actions
Countdown Timer - Create a timer window for HeroRespawn with title (Name of (Triggering unit))
Countdown Timer - Start HeroRespawn as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 10.00) seconds
Set HeroRespawnWindow = (Last created timer window)
Countdown Timer - Change the color of the title for HeroRespawnWindow to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Wait ((Real((Hero level of (Dying unit)))) x 10.00) seconds
Countdown Timer - Hide HeroRespawnWindow
Hero - Instantly revive (Dying unit) at (Center of HeroRevive <gen>), Show revival graphics
Unit - Set mana of (Reviving Hero) to 100.00%
Camera - Apply HeroRevive <gen> for (Owner of (Triggering unit)) over 1.00 seconds
Game - Display to (All allies of (Owner of (Triggering unit))) the text: You have been reviv...




Ability 1
Hellfire
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Hellfire
((Triggering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Life of (Triggering unit)) Less than or equal to 200.00
Then - Actions
Unit - Set mana of (Casting unit) to ((Mana of (Triggering unit)) + 170.00)%
Game - Display to (All allies of (Owner of (Triggering unit))) the text: You need 200 HP or ...
Skip remaining actions
Else - Actions
Do nothing
Unit - Set (Triggering unit) movement speed to 50.00
Animation - Play (Triggering unit)'s spell animation
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Not equal to )) and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Animation - Play (Triggering unit)'s spell animation
Wait 1.00 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Not equal to )) and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Animation - Play (Triggering unit)'s spell animation
Wait 1.00 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Not equal to )) and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Animation - Play (Triggering unit)'s spell animation
Wait 1.00 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Not equal to )) and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Animation - Play (Triggering unit)'s spell animation
Wait 1.00 seconds
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching ((Unit-type of (Matching unit)) Not equal to )) and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Triggering unit)) using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
Special Effect - Create a special effect at (Position of (Matching unit)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Real((Level of Hellfire for (Triggering unit)))) x 30.00))
Unit - Set (Triggering unit) movement speed to (Default movement speed of (Triggering unit))
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 200.00)



Ability 2
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Blood Bath
((Triggering unit) is A Hero) Equal to True
Actions
If ((Life of (Triggering unit)) Less than or equal to 100.00) then do (Skip remaining actions) else do (Do nothing)
Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Wait 0.50 seconds
Unit - Set mana of (Casting unit) to ((Mana of (Triggering unit)) + ((Real((Level of Blood Bath for (Triggering unit)))) x 15.00))%
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - 100.00)


Ability 3
Shadows
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Revive ((Triggering unit) is A Hero) Equal to True
Actions
Unit - Add AOE damage upon death (Paladin) to (Triggering unit)



Anything in the abilities that seems like it could change the reviving trigger?
 
Level 16
Joined
Sep 3, 2004
Messages
2,086
The revival trigger should be seperate from the creation of the timer. Also, you can assign the heros variables, and a timer variable.

A unit Dies
C
Dying unit equal to hero
A
Create Timer
Set timer to ((5x Level of dying unit)) Seconds
Set variable(Player Number) To last created timer


Waits in certain triggers: BAD
 
Status
Not open for further replies.
Top