How do i make the creeps spawn

bessomi

New Member
Reaction score
9
I am having a hard time figguring out how i am supposed to make this map that i am working on.

Its just an ordinary td.
But what triggers do i use to make the creeps spawn?
Like.
-Event
timer expires
-action
create 1 footman at player1 region
create 1 footman at player2 region
create 1 footman at player3 region
create 1 footman at player4 region
create 1 footman at player5 region
create 1 footman at player6 region
create 1 footman at player7 region
create 1 footman at player8 region
wait 2 seconds
create 1 footman at player1 region
create 1 footman at player2 region
create 1 footman at player3 region.....

Am i even close to being right?
 
B

bulletbutter

Guest
You may as well learn to do it right. First, you need to put your trigger in
Code:
 tags. Second, if you made the trigger that way it would leak (leaks can slow your map down). What you need to do is set a variable of a point type then destroy/remove the point after you use it for your moving.

[code]
Move
    Events
        Unit - Enters region
    Conditions
    Actions
        Set P1Temp_Point = (Center of Move 01 <gen>)
        Unit - Order (Entering unit) to Move To P1Temp_Point
        Custom script:   call RemoveLocation (udg_P1Temp_Point)

For the spawning you could just set up your player regions in an array...
Code:
Events
     timer expires
Conditions
Actions
     For each (integer A) from 1-numberofplayers, do (actions)
     -loop
     Create 1 footman at PlayerRegions[intergerA]
     wait 2 seconds
     Create 1 footman at PlayerRegions[intergerA]
 

Don

Rise with the Fallens!
Reaction score
52
Best way:

map init:

set creep[1] = spider
set creep[2] = sheep
....

Other trigger:

E: A timer expires
C: Red is alive = true
A:
- set wave = wave + 1
- create X Creep[wave] at player1 region
- create X Creep[wave] at player2 region.

Creep[] = unit-type, array.
Wave[] = integer, array

that's the easier way to do it andspawn trigger is only 1 trigger. and this trigger is very short.

Also, you might want to remove leak but if you just began i suggest you play a little with WE and then learn about leak removal.
 

AoW_Hun7312

I'm a magic man, I've got magic hands.
Reaction score
76
Code:
MapInit
    Events
        Map initialization
    Conditions
    Actions
        Set creepArray[1] = Footman
        Set creepCount[1] = 20
        Set creepArray[2] = Knight
        Set creepCount[2] = 25
        Set creepArray[3] = Paladin
        Set creepCount[3] = 1

Code:
SpawnCreeps
    Events
        Time - Elapsed game time is 30.00 seconds
        Player - Player 12 (Brown)'s Food used becomes Equal to 0.00
    Conditions
    Actions
        Set Level = (Level + 1)
        For each (Integer A) from 1 to 11, do (Actions)
            Loop - Actions
                Unit - Create creepCount[Level] creepArray[Level] for (Player((Integer A))) at ((Player((Integer A))) start location) facing Default building facing degrees
 

bessomi

New Member
Reaction score
9
Well what if there is no player?
If the player leaves or so, then the creeps will spawn anyway??

How do i fix that
 

OneBadPsycho

10100111001
Reaction score
93
You could setup all of the spawning points into array-point variables with the array-number matching the players number, and then check the players number when he leaves and disable the trigger which spawns creeps for him.

(That just means you must do a spawning trigger for each player or use some if/then/else actions.)
 

Don

Rise with the Fallens!
Reaction score
52
If player slot status = is playing and player controller = user then create X unit at X region for X player facing X degrees!

ok?
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top