• 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.

Problem with Create and Move Trigger

Status
Not open for further replies.
Level 1
Joined
Sep 18, 2010
Messages
2
Im trying to set up a TowerDefence map. Ive spawned the first wave...and then im stuck. NO matter wat i do, only some of them move, the others just stay where they spawn. Also, they keep turning round to go back for 1 or 2 seconds, then go to where i want them to, which is another region. :vw_sad:

How can i get the spawn and move triggers to run smoothly, and without jumping? :ogre_rage:

thnx :goblin_good_job:
 
Level 11
Joined
Aug 6, 2009
Messages
697
Smooth and clean spawn and move trigger.

  • Events
    • Time - Elapsed game time is 40.00 seconds
  • Actions
    • For each (Integer A) from 1 to 25, do (Actions)
      • Loop - Actions
        • Set YourSpawnPoint = (Center of (Playable map area)) //Point Variable
        • Unit - Create 1 Footman for Player 1 (Red) at YourSpawnPoint facing Default building facing degrees
        • Set YourUnit = (Last created unit) //Unit Variable
        • Set YourSendPoint = (Random point in (Playable map area)) //Point Variable
        • Unit - Order YourUnit to Move To YourSendPoint
        • Custom script: call RemoveLocation (udg_YourSpawnPoint)
        • Custom script: call RemoveLocation (udg_YourSendPoint)
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
make sure you have removed this tigger

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Melee Game - Create starting units (for all players)
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Enforce victory/defeat conditions (for all players)
 
This should help!
http://world-editor-tutorials.thehelper.net/towerdef.php

Also I recommend you to read this:
Although some might argue, you can destroy your initialization triggers (on map initialization).
You know, the ones you'll never need again 100% for sure once they execute properly the first time.
You can also remove corpses of creeps - unless you have towers that can raise the dead in which case you might want to rethink that, but for the most part, removing corpses is amazing for anti-lag purposes.
Simply create a trigger that runs whenever a unit owned by the creep player dies, wait 2 seconds, and then remove the unit from the game, corpse and all.
However, the largest anti-lag issue relates to creating large numbers of units at one time, and ordering them to move.
Try to limit how many creeps appear per level to 20 or so.
 
Status
Not open for further replies.
Top