• 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] help with spawn trigger

Status
Not open for further replies.
Level 19
Joined
Feb 15, 2008
Messages
2,184
  • Spawn Good Main
    • Events
      • Time - Every 40.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
      • Unit - Create 3 Elven Soldier )LotR) for Player 1 (Red) at (Center of Good Middle <gen>) facing (Center of (Playable map area))
      • Unit - Create 1 Elven Wizard )LotR) for Player 1 (Red) at (Center of Good Middle <gen>) facing (Center of (Playable map area))
      • Unit - Create 1 Dryad )LotR) for Player 1 (Red) at (Center of Good Middle <gen>) facing (Center of (Playable map area))
      • Unit - Order (Entering unit) to Attack-Move To (Center of Evil Main <gen>)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 3 Elven Soldier )LotR) for Player 1 (Red) at (Center of Good Left <gen>) facing (Center of (Playable map area))
          • Unit - Create 1 Elven Wizard )LotR) for Player 1 (Red) at (Center of Good Left <gen>) facing (Center of (Playable map area))
          • Unit - Create 1 Dryad )LotR) for Player 1 (Red) at (Center of Good Left <gen>) facing (Center of (Playable map area))
          • Unit - Order (Entering unit) to Attack-Move To (Center of Region 019 <gen>)
          • For each (Integer A) from 1 to 3, do (Actions)
            • Loop - Actions
              • Unit - Create 3 Elven Soldier )LotR) for Player 1 (Red) at (Center of Good Right <gen>) facing (Center of (Playable map area))
              • Unit - Create 1 Elven Wizard )LotR) for Player 1 (Red) at (Center of Good Right <gen>) facing (Center of (Playable map area))
              • Unit - Create 1 Dryad )LotR) for Player 1 (Red) at (Center of Good Right <gen>) facing (Center of (Playable map area))
              • Unit - Order (Entering unit) to Attack-Move To (Center of Region 012 <gen>)
made a spawn trigger and it dont make the units i have no idea why and how i make for that player....

Like if i want only player 1 red to make this moves to that region ? how i gon do this trigger?
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Heya dude... first of all, you leak alot. You need to fix those point leaks... And I think you messed up with the loops a bit (unless its suppose to create trice as many units you want). Let see...

  • Spawn
    • Events
      • Time - Every 40.00 seconds of game time
    • Conditions
    • Actions
      • Set temppoint = (Center of (Center of Good Middle <gen>))
      • Set temppoint_2 = (Center of (Center of Evil Main <gen>))
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Elven Soldier )LotR) for Player 1 (Red) at temppoint facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Unit - Create 1 Elven Wizard )LotR) for Player 1 (Red) at temppoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Unit - Create 1 Dryad for Player 1 (Red) at temppoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Custom script: call RemoveLocation( udg_temppoint )
      • Custom script: call RemoveLocation( udg_temppoint_2 )
      • Set temppoint = (Center of (Center of Good Left <gen>))
      • Set temppoint_2 = (Center of (Center of Region 019 <gen>))
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Elven Soldier )LotR) for Player 1 (Red) at temppoint facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Unit - Create 1 Elven Wizard )LotR) for Player 1 (Red) at temppoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Unit - Create 1 Dryad for Player 1 (Red) at temppoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Custom script: call RemoveLocation( udg_temppoint )
      • Custom script: call RemoveLocation( udg_temppoint_2 )
      • Set temppoint = (Center of (Center of Good Right <gen>))
      • Set temppoint_2 = (Center of (Center of Region 012 <gen>))
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Elven Soldier )LotR) for Player 1 (Red) at temppoint facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Unit - Create 1 Elven Wizard )LotR) for Player 1 (Red) at temppoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Unit - Create 1 Dryad for Player 1 (Red) at temppoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Attack-Move To temppoint_2
      • Custom script: call RemoveLocation( udg_temppoint )
      • Custom script: call RemoveLocation( udg_temppoint_2 )
Heh, basically the trigger is just containing copy and paste actions, but in addition, the temppoints changes values after the desired 'center of region'. Also, I didnt bother face the created units towards the center of playable map area, since it leaks additional points. Use preset values or angle values instead.
 
Status
Not open for further replies.
Top