Spawn problem

sabel

Cool Member
Reaction score
0
i dont know how to get this done

but i want to do it so one of my units spawns 5 soldiers every 2 min

3 footmens, 2 archers (i change riflemens to archers) and 2 Knights

anybody? :)
 

fiskenfisk

New Member
Reaction score
1
If you want it to spwan every 2 minutes do like this (I am sure there is an easier way but.

Events: Every 120seconds of game time (This is a Periodic Event)

Action: Unit - Create 5 Soldiers for Player(Who you want) at (Your Spawn location) facing defualt building degrees

And you do the same with the other units aswell. Hope this helps ;)
 

LurkerAspect

Now officially a Super Lurker
Reaction score
118
Trigger:
  • Events
    • Every 120 seconds
    • Conditions
    • Actions
      • Set yourlocation = (wherever you want)
      • Create 5 Soldiers for (Player whatever) at yourlocation...
      • Create 3 Archers " " "
      • Create 2 Knights " " "
      • Custom Script: call RemoveLocation(udg_yourlocation)

yourlocation is a point variable. The custom script prevents a memory leak.
 

sabel

Cool Member
Reaction score
0
errr rly didnt help much

when i go in triggers and then do all that stuff

how do i then get it to be like it says there because i cant write in it so there stands it
 

Rainther

I guess I should write something of value here...
Reaction score
61
They copied the text and changed it afterwards.
In the line Set yourlocation =
Put use the Position of Unit function and insert your unit.

You're not supposed to do exactly as written above, since it can't be done and wouldn't work if it could.
 

sabel

Cool Member
Reaction score
0
its my first-(newbie) time i do trigger stuff so its hard to understand


1.but i go to the trigger and opens it
2.new catagory
3.then i click new trigger
4.then i click new event and a box comes up and then i get lost
 

fiskenfisk

New Member
Reaction score
1
For the Event: Press new Event, find the "Time - Periodic Timer", when you click you will see a thing that says "Every 2.00 seconds of game". Change that to 120.00 instead.

Actions: Press new Action. Find Unit - Create Units Facing Angle. After you pressed the square beneath will change to some functions: Create 5 Soldiers for Player(Who you want) at (Center of Spawn <gen>) facing Default building facing degrees.

You then do the same with the other units aswell.

The "Spawn <gen>" is a Region you will need to make at your spot you want them you spawn. Hope this is a little better.
 

sabel

Cool Member
Reaction score
0
thxs it worked, but when the units spawns they dont got the colour i set them to have

i sat the first team to be green and the other team to be brown when the units spawn they get a normal colour

the one whos player red. when his units spawns they aint green they red

how do i do so they keep the colour when they spawns?
 

Rainther

I guess I should write something of value here...
Reaction score
61
Would this do the trick?
Trigger:
  • Unit - Change color of (Last created unit) to Green

Note: I belive if you create a unit and set their team color in the object editor they don't have it if you create them through triggers, which means you'll have to add this line after you create them.
 

sabel

Cool Member
Reaction score
0
rainther the trigger you showed me didnt help


when the units spawn they had the original colour

like the one whos red his units will spawn with the red colour


and i want it to be those on team 2's units to be spawned as brown and those on team 1 spawn as green

and my triggers is only spawn triggers where units spawns to the places thats choosen to them
 

fiskenfisk

New Member
Reaction score
1
When you made the units, did you change the "For player green"? This might be the problem that they have the Red color.

More specific: Unit - Create 5 Soldiers for player 7 (green) at (Center of (Spawn Place <gen>)) Facing default building degrees. If you didn't change the "For player" then they will just be made for player red - the color is red.
 

Rainther

I guess I should write something of value here...
Reaction score
61
You'd have to add If Then Else together with what I typed.

For instance:
If Triggering Player == Player Red
then
Unit - Change color of (Last created unit) to Green
else
Unit - Change color of (Last created unit) to Brown

But you'll have to add all of the players who you want to get greencolored units. Add all of this after you've created the unit.
 

sabel

Cool Member
Reaction score
0
You'd have to add If Then Else together with what I typed.

For instance:
If Triggering Player == Player Red
then
Unit - Change color of (Last created unit) to Green
else
Unit - Change color of (Last created unit) to Brown

But you'll have to add all of the players who you want to get greencolored units. Add all of this after you've created the unit.


didnt work

i tested it as player 1 and i was red and all my soldiers was green
but when the spawn happend the soldiers had the red colour,


should i put that trigger at the same place as the spawn triggers?
 

sabel

Cool Member
Reaction score
0
This should be added in the same trigger that you create the units and directly after if possible.

so you want me to put the trigger under


Unit - Create 2 Shu Calvary for Player 2 (Blue) at (Center of blue Gate <gen>) facing Default building facing degrees

and then the next one under the next spawn trigger so the colour trigger comes under each players soldier?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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