• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Some Easy Triggers...

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
1.

  • Random Mode
    • Events
      • Player - Player 2 (Blue) types a chat message containing -rm as A substring
      • Player - Player 2 (Blue) types a chat message containing -random mode as A substring
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Trigger - Turn off (This trigger)
          • Set Random_Hero[(Player number of (Triggering player))] = (Random integer number between 1 and 5)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Random_Hero[(Player number of (Picked player))] Equal to 1
            • Then - Actions
              • Set TempLoc = (Center of (Playable map area))
              • Unit - Create 1 Gign (MCS) for (Picked player) at TempLoc facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_TempLoc)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Random_Hero[(Player number of (Picked player))] Equal to 2
                • Then - Actions
                  • Set TempLoc = (Center of (Playable map area))
                  • Unit - Create 1 Elite (MCS) for (Picked player) at TempLoc facing Default building facing degrees
                  • Custom script: call RemoveLocation(udg_TempLoc)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Random_Hero[(Player number of (Picked player))] Equal to 3
                    • Then - Actions
                      • Set TempLoc = (Center of (Playable map area))
                      • Unit - Create 1 Phoenix (MCS) for (Picked player) at TempLoc facing Default building facing degrees
                      • Custom script: call RemoveLocation(udg_TempLoc)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Random_Hero[(Player number of (Picked player))] Equal to 4
                        • Then - Actions
                          • Set TempLoc = (Center of (Playable map area))
                          • Unit - Create 1 Arctic (MCS) for (Picked player) at TempLoc facing Default building facing degrees
                          • Custom script: call RemoveLocation(udg_TempLoc)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Random_Hero[(Player number of (Picked player))] Equal to 5
                            • Then - Actions
                              • Set TempLoc = (Center of (Playable map area))
                              • Unit - Create 1 Sas (MCS) for (Picked player) at TempLoc facing Default building facing degrees
                              • Custom script: call RemoveLocation(udg_TempLoc)
                            • Else - Actions
a nice guy helped me with this trigger...

So now the question is how do i make it spawn at right regions.
Like on player 1 team spawn in sentinel base and the other in scourge ?

2.

Timer:
Countdown timer Till creeps start spawning (In right corner)

How i make this one?

3.

Revive In Tavern, Now the heroes revive at the tavrn how i solve this so they dont reveive there after die

4.

Block Region, How i make so units cant enter a region sry about that easy queston dident find that action

5.

And last one, My Revive system is not working here goes the trigger

  • Hero Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • (Owner of (Dying unit)) Not equal to Neutral Hostile
    • Actions
      • Unit Group - Add (Dying unit) to RevivableHeroes
      • Set TempReal = (((Real((Hero level of (Dying unit)))) x 2.00) + 1.00)
      • Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in TempReal seconds
      • Countdown Timer - Create a timer window for ReviveTimers[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
      • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
      • Set RevivableTimersWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
  • Hero Respawn Timer
    • Events
      • Time - ReviveTimers[1] expires
      • Time - ReviveTimers[2] expires
      • Time - ReviveTimers[3] expires
      • Time - ReviveTimers[4] expires
      • Time - ReviveTimers[5] expires
      • Time - ReviveTimers[6] expires
      • Time - ReviveTimers[7] expires
      • Time - ReviveTimers[8] expires
      • Time - ReviveTimers[9] expires
      • Time - ReviveTimers[10] expires
      • Time - ReviveTimers[11] expires
      • Time - ReviveTimers[12] expires
    • Conditions
    • Actions
      • Set Herorevivingspot[1] = (Center of Revive Spawn T <gen>)
      • Set Herorevivingspot[2] = (Center of Revive Spawn CT <gen>)
      • Unit Group - Pick every unit in RevivableHeroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]) Less than 1.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is in PlayersSaints) Equal to True
                • Then - Actions
                  • Countdown Timer - Destroy RevivableTimersWindows[(Player number of (Owner of (Picked unit)))]
                  • Hero - Instantly revive (Picked unit) at Herorevivingspot[2], Show revival graphics
                  • Unit Group - Remove (Picked unit) from RevivableHeroes
                  • Custom script: call RemoveLocation (udg_Herorevivingspot[2])
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Picked unit)) is in PlayerSource) Equal to True
                • Then - Actions
                  • Countdown Timer - Destroy RevivableTimersWindows[(Player number of (Owner of (Picked unit)))]
                  • Hero - Instantly revive (Picked unit) at Herorevivingspot[1], Show revival graphics
                  • Unit Group - Remove (Picked unit) from RevivableHeroes
                  • Custom script: call RemoveLocation (udg_Herorevivingspot[1])
                • Else - Actions
            • Else - Actions
Why isent my heroes respawning. And also there shoudl be a working respawn timer for them aswell now showing up any time on it...

So this is all i need so far...

:fp:

Wubz
 
Level 5
Joined
Jan 4, 2007
Messages
103
1.

So now the question is how do i make it spawn at right regions.
Like on player 1 team spawn in sentinel base and the other in scourge ?

Just add the two variables Herorevivespot1 and Herorevivespot2 and at every If-then-else add the If-then-else from the Hero Respawn Timer trigger, Owner of Picked Unit is in PlayerSaints Equals to True, Create 1 Hero at Herorevivespot2 and the if-then-else below it Owner of Picked Unit is in PlayerScourge Equals to True, Create 1 hero at Herorevivespot1 ect. Hope it helps:)
 
Level 4
Joined
Sep 12, 2008
Messages
111
PHEW!!!lolx...
I've made a Hero Respawn Trigger For YOU!!!
This is exactly what you wanted!!Attached it =)
  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Dying unit) is A Hero) Equal to True
    • (Owner of (Dying unit)) Not equal to Neutral Hostile
  • Actions
    • Unit Group - Add (Dying unit) to RevivableHeroes
    • Set TempReal = (((Hero level of (Dying unit)) x 2) + 1)
    • Countdown Timer - Start ReviveTimers[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in (Real(TempReal)) seconds
    • Countdown Timer - Create a timer window for ReviveTimers[(Player number of (Owner of (Dying unit)))] with title (Name of (Owner of (Dying unit)))
    • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
    • Set ReviveTimersWindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
  • Events
    • Time - ReviveTimers[1] expires
    • Time - ReviveTimers[2] expires
    • Time - ReviveTimers[3] expires
    • Time - ReviveTimers[4] expires
    • Time - ReviveTimers[5] expires
    • Time - ReviveTimers[6] expires
    • Time - ReviveTimers[7] expires
    • Time - ReviveTimers[8] expires
    • Time - ReviveTimers[9] expires
    • Time - ReviveTimers[10] expires
    • Time - ReviveTimers[11] expires
    • Time - ReviveTimers[12] expires
  • Actions
    • Unit Group - Pick every unit in RevivableHeroes and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Integer((Remaining time for ReviveTimers[(Player number of (Owner of (Picked unit)))]))) Less than 1
          • Then - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Owner of (Picked unit)) is in PlayersSaints) Equal to True
              • Then - Actions
                • Countdown Timer - Destroy ReviveTimersWindow[(Player number of (Owner of (Picked unit)))]
                • Hero - Instantly revive (Picked unit) at Hero_Revive_Spot[1], Show revival graphics
                • Unit Group - Remove (Picked unit) from RevivableHeroes
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Owner of (Picked unit)) is in PlayersSource) Equal to True
              • Then - Actions
                • Countdown Timer - Destroy ReviveTimersWindow[(Player number of (Owner of (Picked unit)))]
                • Hero - Instantly revive (Picked unit) at Hero_Revive_Spot[2], Show revival graphics
                • Unit Group - Remove (Picked unit) from RevivableHeroes
              • Else - Actions
          • Else - Actions
  • Events
    • Time - Elapsed game time is 0.00 seconds
  • Actions
    • Set Hero_Revive_Spot[1] = (Random point in Region 000 <gen>)
    • Set Hero_Revive_Spot[2] = (Random point in Region 001 <gen>)
    • Player Group - Add Player 1 (Red) to PlayersSaints
    • Player Group - Add Player 2 (Blue) to PlayersSource
    • Custom script: call DestroyTrigger(GetTriggeringTrigger())
+REP to me if it is what you wanted =)!!!
 

Attachments

  • Testing Hero Revive.w3x
    16.7 KB · Views: 54
Level 4
Joined
Sep 12, 2008
Messages
111
Finally done.....your 5 Needed Things......
Attached it =)
+REP to me if it's what you wanted =P
 

Attachments

  • Random Mode + Your 5 Needed Things.w3x
    16.4 KB · Views: 40
Level 11
Joined
Sep 12, 2008
Messages
657
Darkdread, double post is not allowed unless theres a diffrence of 48 hours.
try to avoid it plz.

i cant see why you used tempreal.
you should put it in the 0.00 trigger,
since Shangai isnt the best in triggering (as far as you see), or he's just lazy.
i'd still put it in 0.00 unless he wants a speical condition as what you did:
level of unit (*, /, Sin, Cos, Square, etc.) X (Variable, or w/e).
 
Status
Not open for further replies.
Top