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

[Trigger] A Little Trigger Problem!

Status
Not open for further replies.
Level 37
Joined
Aug 14, 2006
Messages
7,602
Hi.

I need your help. I'm creating an item that resurrects the wielder. Something is wrong, it resurrects the wielder always. The countdown trigger should be the cooldown.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Dying unit) has an item of type Angel's Prayer) Equal to True
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Remaining time for Revive_Timer[1]) Less than or equal to 0.00
        • Then - Actions
          • Wait 3.00 seconds
          • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
          • Unit - Set life of (Dying unit) to 100.00%
          • Unit - Set mana of (Dying unit) to 100.00%
          • Countdown Timer - Start Revive_Timer[1] as a One-shot timer that will expire in 300.00 seconds
          • Skip remaining actions
        • Else - Actions
    • Else - Actions
  • Game Over Fradz
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to AAAFradz
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Wings Of An Angel) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Resource__LUCK Greater than 9
            • Then - Actions
              • Set Integer = (90 + (Resource__LUCK - 9))
            • Else - Actions
              • Set Integer = (Resource__LUCK x 10)
              • Set Random = (Random integer number between 1 and 100)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Random Less than or equal to Integer
                • Then - Actions
                  • Wait 3.00 seconds
                  • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
                  • Unit - Set life of (Dying unit) to 100.00%
                  • Unit - Set mana of (Dying unit) to 100.00%
                  • Skip remaining actions
                • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Angel's Prayer) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Revive_Timer[1]) Less than or equal to 0.00
            • Then - Actions
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Countdown Timer - Start Revive_Timer[1] as a One-shot timer that will expire in 300.00 seconds
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Angel's Gift) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Revive_Timer[2]) Less than or equal to 0.00
            • Then - Actions
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Countdown Timer - Start Revive_Timer[2] as a One-shot timer that will expire in 300.00 seconds
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Belt Of Sunrise) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Revive_Timer[3]) Greater than or equal to 1.00
            • Then - Actions
            • Else - Actions
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Countdown Timer - Start Revive_Timer[3] as a One-shot timer that will expire in 300.00 seconds
              • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Resurrection Phial) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by (Dying unit) of type Resurrection Phial)) Less than or equal to 1
            • Then - Actions
              • Item - Remove (Item carried by (Dying unit) of type Resurrection Phial)
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 50.00%
              • Unit - Set mana of (Dying unit) to 50.00%
              • Skip remaining actions
            • Else - Actions
              • Item - Set charges remaining in (Item carried by (Dying unit) of type Resurrection Phial) to ((Charges remaining in (Item carried by (Dying unit) of type Resurrection Phial)) - 1)
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 50.00%
              • Unit - Set mana of (Dying unit) to 50.00%
              • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) has an item of type Strong Resurrection Phial) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by (Dying unit) of type Strong Resurrection Phial)) Less than or equal to 1
            • Then - Actions
              • Item - Remove (Item carried by (Dying unit) of type Strong Resurrection Phial)
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Skip remaining actions
            • Else - Actions
              • Item - Set charges remaining in (Item carried by (Dying unit) of type Strong Resurrection Phial) to ((Charges remaining in (Item carried by (Dying unit) of type Strong Resurrection Phial)) - 1)
              • Wait 3.00 seconds
              • Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
              • Unit - Set life of (Dying unit) to 100.00%
              • Unit - Set mana of (Dying unit) to 100.00%
              • Skip remaining actions
        • Else - Actions
      • Unit - Pause all units
      • Sound - Play gg_snd_Game_Over
      • Animation - Change Game_Over_Unit's animation speed to 20.00% of its original speed
      • Camera - Lock camera target for Player 1 (Red) to Game_Over_Unit, offset by (0.00, 0.00) using Default rotation
      • Camera - Set Player 1 (Red)'s camera Distance to target to ((Distance to target of the current camera view) - 500.00) over 5.00 seconds
      • Cinematic - Fade out over 5.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set Music_Volume = (Music_Volume - 10.00)
          • Sound - Set music volume to Music_Volume%
          • Wait 0.10 seconds
      • Sound - Stop music Immediately
      • Sound - Clear the music list
      • Wait 4.00 seconds
      • Cinematic - Apply a filter over 2.00 seconds using No blending on texture war3campImported\Game Over512x512.blp, starting with color (0.00%, 0.00%, 0.00%) and 0.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
      • Wait 2.00 seconds
      • Cinematic - Apply a filter over 9999.00 seconds using No blending on texture war3campImported\Game Over512x512.blp, starting with color (100.00%, 100.00%, 100.00%) and 100.00% transparency and ending with color (100.00%, 100.00%, 100.00%) and 100.00% transparency
      • Wait 5.00 seconds
      • Game - Defeat Player 1 (Red) with the message: |c00FF80FFDragon Sl...
 
Last edited:
Level 13
Joined
Sep 14, 2008
Messages
1,408
1. What????? really?????

2. (sorry only german we here atm)

See you make a boolen for example abilityRdy.
When the trigger runs you check (instead of the remaining time) if the boolean is true.
IF it is true the trigger runs. -> in the end of it set the boolean false and start the timer

WHEN the timer expires set the boolean true. (1 extra trigger)
 
Level 4
Joined
Nov 28, 2007
Messages
107
It is not "Dying Unit" it has to be "Triggering Unit".... :| i think... try switching it.
[I did not read hole thing but i think that is your problem. :) If it is "Dying Unit" it means any unit that has died so you would be getting music and w/e else i saw in there with a unit dying ad other things dying...]

If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions

(Charges remaining in (Item carried by (Dying unit) of type Strong Resurrection Phial)) """Less than or equal to 1""" <---- less then??? so if it is 0 too? [just asking]

Then - Actions

Item - Remove (Item carried by (Dying unit) of type Strong Resurrection Phial)
Wait 3.00 seconds
Hero - Instantly revive (Dying unit) at (Position of (Dying unit)), Show revival graphics
Unit - Set life of (Dying unit) to 100.00%
Unit - Set mana of (Dying unit) to 100.00%
Skip remaining actions
 
Level 37
Joined
Aug 14, 2006
Messages
7,602
Dying unit isn't the problem. I have tested it and remember there is that condition that checks if the unit is a specific unit.

And yeah, that resurrection thing is a bit crazy, I know, but it doesn't bug.

The bug is that countdown timer. When I have Angel's Prayer, Angel's Gift or Belt Of Sunrise in inventory I'll be resurrected always.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hey, aero :D

This really puzzles me...
I guess the revive timer is actually the 'cooldown' of the item?

I have made the exact same trigger (only the "Angels' Prayer"- and "Resurrection Phial"-trigger) and it worked for me.
I can attach the test-map, so you can see for yourself if you want.
May I know how you test the map?
Did you carry any other items, what is your luck, things like that?
 
Status
Not open for further replies.
Top