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

[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:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
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).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
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