• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[B]Really need help to find triggers and a ability

Status
Not open for further replies.
Level 12
Joined
Jan 20, 2011
Messages
1,146
OK I accidentally posted the same thread on triggers but now when I found the right forum I need help:vw_wtf:

So I'm making a map similar to azeroth wars (1.49) and I need a custom defeat
condition trigger when the main building or Hero is destroyed all units go hostile
and player losses . Example:

Sargeras or The Sunwell is destroyed all units go hostile an players losses or becomes observer and when the World tree is destroyed everything is the same but Malfurion changes to another player.:infl_thumbs_up:

And I need a custom ability that doesn't show at the hero Example :

Lich King walks and creates blight where he steps:spell_breaker:

thank you:thumbs_up:
 
Custom defeat system:

  • Custom defeat System
    • Events
      • Unit - Hero Dies
      • Unit - Building Dies
      • Unit - Malfurion Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Triggering unit) Equal to Hero
              • (Triggering unit) Equal to Building
        • Then - Actions
          • -------- Main Hero / Building has been destroyed --------
          • Set TempGroup = (Units in (Playable map area))
          • Set CountUnits = 0
          • Unit Group - Pick every unit in TempGroup and do (Actions)
            • Loop - Actions
              • Set PlayerOwner[CountUnits] = (Owner of (Picked unit))
              • Set Unit[CountUnits] = (Picked unit)
              • Unit - Change ownership of (Picked unit) to Neutral Hostile and Change color
              • Set CountUnits = (CountUnits + 1)
          • Custom script: call DestroyGroup(udg_TempGroup)
        • Else - Actions
          • -------- Malfurion has been killed --------
          • For each (Integer LoopInt) from 0 to CountUnits, do (Actions)
            • Loop - Actions
              • -------- Is unit still alive? --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Life of Unit[LoopInt]) Greater than or equal to 0.00
                • Then - Actions
                  • -------- Reset player owner --------
                  • Unit - Change ownership of Unit[LoopInt] to PlayerOwner[LoopInt] and Change color
                • Else - Actions
          • -------- Set owner of malfurion to another player --------
          • Set RandInt = (Random integer number between 1 and 10)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of Malfurion) Not equal to (Player(RandInt))
            • Then - Actions
              • Unit - Change ownership of Malfurion to PlayerOwner[LoopInt] and Change color
            • Else - Actions
Create Blight:
  • Walk Blight
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set TempLoc = (Position of Lich King)
      • Environment - Create Blight for Player from TempLoc to a radius of 64.00
      • Custom script: call RemoveLocation(udg_TempLoc)
This might not be the best system, but it surely does the trick (and doesn't really leak).
 
Custom script: it's basically a line of JASS you use in GUI.
It's the 3rd action (in the category "All"), so you can't really miss it.

I can't help you understand the trigger.
The only thing I can do is advice you to learn how to use If/Then/Elses and loops, because the triggers I've shown really aren't hard at all.
They just use some of the basic methods to make triggers efficient (namely ITE's and loops).
 
Status
Not open for further replies.
Top