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

[Trigger] Need Help.

Status
Not open for further replies.
Hello, I wanna know how to make a trigger that..
1 - Makes you spawn units in an area and do a trigger so that when they die, another takes their place.
2-How to make heroes owned by a player gain gold by killing another player's units
3-Spawning units in an area and make them drop specific items.


..Willing to give credits and reputation to anyone that helps.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
2.
  • Untitled Trigger 019
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
      • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
        • Then - Actions
          • Player - Add 1000 to (Owner of (Killing unit)) Current gold
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Knight
            • Then - Actions
              • Player - Add 1000 to (Owner of (Killing unit)) Current gold
            • Else - Actions
3.
  • Untitled Trigger 021
    • Events
    • Conditions
    • Actions
      • Set point1 = (Random point in Region 000 <gen>)
      • Unit - Create 1 Footman for Player 1 (Red) at point1 facing (Random angle) degrees
      • Custom script: call RemoveLocation(udg_point1)
^I don't know what kind of event you want to use.

  • Untitled Trigger 020
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set point1 = (Position of (Triggering unit))
      • Item - Create Tome of Experience at point1
      • Custom script: call RemoveLocation(udg_point1)
^You can do some unit type checks and create the item based on that. You can use this trigger to solve problem 1. But instead of creating an item, create a unit.
 
Level 12
Joined
Aug 22, 2008
Messages
911
1.
You'll need a region for this trigger, let's call it SpawnPlace.
  • Events
    • <Place your events here>
  • Conditions
    • <Place your conditions here>
  • Actions
    • Set point = (Center of SpawnPlace)
    • Unit - Create X Creeps at point facing <Angle>
    • Custom Script: call RemoveLocation(udg_point)
    • Set unitgroup = (Last Created Unit Group)
    • Set point = <Rally Point of Creeps>
    • Unit Group - Pick every unit in unitgroup and do (All Actions)
      • Loop - Actions
        • Unit - Add classifation of Giant to (Picked Unit)
        • (I chose Giant because it's mostly not used ingame and thus wouldn't disturb gameplay)
        • Unit - Order (Picked Unit) to Attack-Move to point
    • Custom Script: call RemoveLocation(udg_point)
    • Custom Script: call DestroyGroup(udg_unitgroup)
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering Unit) is a Giant) equal to True
  • Actions
    • Unit - Create 1 (Unit-type of (Triggering Unit)) for (Owner of (Triggering Unit)) facing (Facing of (Triggering Unit))
    • Set point = <Rally point of Unit>
    • Unit - Order (Last Created Unit) to Attack-Move to point
    • Custom Script: call RemoveLocation(udg_point)
 
Status
Not open for further replies.
Top