How spawn units every 30 second for one build like farmer vs hunter?

egomanyak

New Member
Reaction score
8
for example:
have a footman spawner
when he build f.spawner spawn every 30 second 1 footman in area

when he have 2 f.spawner spawn every 30 second 2 footman
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Spawn them all at 1 building, or each of their own buildings?
 

egomanyak

New Member
Reaction score
8
each have own building


example: red have 2 footman spawner
get 2 footman for red every 30 second

and blue have 3 footman spawner

get 3 footman for blue every 30 second


and must be near to building
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Trigger:
  • Untitled Trigger 008
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Set tmpGroup = (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to True))
      • Unit Group - Pick every unit in tmpGroup and do (Actions)
        • Loop - Actions
          • If ((Unit-type of (Picked unit)) Equal to Farm) then do (Set tmpUnitType = Peasant) else do (Do nothing)
          • If ((Unit-type of (Picked unit)) Equal to Gryphon Aviary) then do (Set tmpUnitType = Gryphon Rider) else do (Do nothing)
          • -------- Here go's the unit creation.. --------
          • Set tmpLoc = (Position of (Picked unit))
          • Unit - Create 1 tmpUnitType for (Owner of (Picked unit)) at tmpLoc facing (Random angle) degrees
          • Custom script: call RemoveLocation( udg_tmpLoc )
 

egomanyak

New Member
Reaction score
8
erm... can you give map file i cant find set im newbie sorry
thanks

opppss. im searhing in events sorry im trying now :)


again... what is variables type?
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
You have different variable types, such as integers, unit groups, booleans, reals, triggers, etc.. a long list. Each of those variables can hold specific values.

Such as a unit can hold the value of a created unit.

The ones I used are:
  1. tmpGroup - Unit Group
  2. tmpUnitType - Unit Type
  3. tmpLoc - Point
 

egomanyak

New Member
Reaction score
8
Trigger:
  • Spawn
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Set BuildSpawnGroup = (Units in (Playable map area) matching (((Matching unit) is A structure) Equal to (==) True))
      • Unit Group - Pick every unit in BuildSpawnGroup and do (Actions)
        • Loop - Actions


how do if?
Trigger:
  • Loop - Actions
    • If ((Unit-type of (Picked unit)) Equal to Farm) then do (Set tmpUnitType = Peasant) else do (Do nothing)
    • If ((Unit-type of (Picked unit)) Equal to Gryphon Aviary) then do (Set tmpUnitType = Gryphon Rider) else do (Do nothing)
    • -------- Here go's the unit creation.. --------
    • Set tmpLoc = (Position of (Picked unit))
    • Unit - Create 1 tmpUnitType for (Owner of (Picked unit)) at tmpLoc facing (Random angle) degrees
    • Custom script: call RemoveLocation( udg_tmpLoc )
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Action -> If / Then / Else
Condition -> Unit Type Conparison
Then -> Set Variable
Else -> Select & Click for Do Nothing.
 
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