Maximum Town Population

LordChicken

New Member
Reaction score
0
Hello im haveing a bit of.:banghead:.:mad:.Hard times trying to figure out how this is done so im just asking the pros namly, you guys!:D

Im my map, the main feed for the Players is towns people:thup:,

the problem is I have a trigger that spawns towns people all threw the towns, but there is no cap to population in each town:thdown:

so around mid game the lag is unbearable fot there are 400-1000 towns people unless youve just done nothing expt kill every person the moment they spawn in town.

so I Ask how can i set it so that it stops spawing poeple when the pop of the town reaches [like 20] and starts up agian when at lower then [like 20]

any help would be loved thank you
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Make each town a region.
If the number of units in that region exceeds 20, stop spawning.
If the number of units in that region goes below 20, start the spawn trigger again.
 

LordChicken

New Member
Reaction score
0
So Far this is my trigger and i need help with conditions


Event
Map initialization

Conditions:none

Acions: if/then/else/

Conditions:________________________

Then: turn of spawn

Else: Turn on spawn

i need help filling in that line my towns are alreay a regieon
 

gameman

It's been a long, long time.
Reaction score
96
Code:
set Temp_real = number of units in (playable map area) [Found under unit group]
if/then/else
  if temp_real not equal to 20
then create 1 peasent.

Sorry for any grammer and spelling problems, to much time off The helper.net
 
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