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

Spawn help

Status
Not open for further replies.
Level 36
Joined
Nov 24, 2007
Messages
4,404
Hey guys, i wanna make a spawn trigger that works this way:

You are able to build 1 Command Post, when built there will spawn units on it every 60 second.

I dont know how to make it, and i dont care how easy or hard it is, i only ask if someone can be as kind as to show me the trigger? :)
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
2 triggers:

  • command post created
  • Events
    • Unit - a Unit finishes construction
  • Conditions
    • triggering Unit is a command post
    • owner of triggering unit equal to player1
  • Actions
    • Trigger - turn on <Unit spawn>
    • set triggering unit = player1commandpost
trigger 2, initially off!
  • Unit spawn
  • Events
    • Time - every 60 seconds of the game
  • Actions
    • set temppoint = position of player1commandpost
    • Unit - create 1 Unit at player1commandpost
    • Custom script: call RemoveLocation(udg_TempPoint)
do this for every player
 
Level 36
Joined
Nov 24, 2007
Messages
4,404
So, I've followed everything up, made the unit variable and the region variable, copyed the trigger you showed me, and everything SHOULD work, but it dont. For some reason they keep spawning like a radom spot on the map, but all at same spot, not in the senter of the map but like, if the building is in the right corner, they might just spawn in the left one... frustrating...
 
Level 3
Joined
Jun 25, 2008
Messages
65
emperor_d3st is right...

Events
Unit - a Unit finishes construction
Conditions
triggering Unit is a command post
owner of triggering unit equal to player1

That does not work...
Has to be:

Events
Unit - a Unit finishes construction
Conditions
Builded Unit is a command post
owner of Builded unit equal to player1



And Keiji
The second trigger called "UnitSpawn" has to be offline at mapstart.
On top there are 2 Check-Boxes. Remove the Mark in the one called "At Beginning On" (Maybe not exactly called that ...)
 
Level 36
Joined
Nov 24, 2007
Messages
4,404
Well i did notice that right after i asked, but then someone replyed and i thought it was not problem, which it wasnt either, but if it IS a problem, than i humbly ask if a Mod or Admin can move this thread to its right location.
 
Level 11
Joined
Oct 20, 2007
Messages
342
If you want an easy spawn way.
Add a skill named factory(unit skill, not hero skill).
the skill code is "ANfy"
the see the code, press ctrl+D, ctrl+f to find text.

factory skill
- you can change the spawn interval (60 if you wan very 60 seconds)
- spawn unit type as you like.
- duration can put 0 seconds for forever.

If u wan spawn 2 or more unit give the unit more skill.
each skill spawn unit. (can be difference unit also.

If you want order them to move to a point after spawn
the trigger response to the unit.

  • Move
    • Events
      • Unit - A unit enters (Playable map area)<region>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to <Unit Type>
    • Actions
      • Unit - Order (Triggering unit) to Move To <Position>
Or more advance trigger to reduce memory leak:
  • Move
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Temp_Point = (Center of (Playable map area))
      • Unit - Order (Triggering unit) to Move To Temp_Point
      • Custom script: call RemoveLocation (udg_Temp_Point)
(Extra)
[How to do Custom script
juz select the trigger and copy up the word "call RemoveLocation (udg_Temp_Point)" and paste on it.]
 
Status
Not open for further replies.
Top