Jump to content

Recommended Posts

Posted (edited)

Hi all,

I use the following script to spawn new unit (1 source f14 group name)

)ZoneTable = {ZONE:New("Z1"), ZONE:New("Z2")}


Spawn_plane = SPAWN: New("f14")
:InitLimit ( 3, 3)
:InitRandomizeRoute ( 1, 1, 200 )
:InitRandomizeZones ( ZoneTable )
: SpawnScheduled ( 1, .1)

the problem is:

I use this in a switche condition loop. (when flag on spawn then turn off flag after 3 seconds)

When I select item menu it spawns 3 units randomly in zones.

BUT ! when I use it again on the next cycle new units spawn but old ones disappears.

How can I write to keep the previous spawns alive ?

 

 

 

 

 

Edited by ata_sa
  • 4 weeks later...
Posted

you should have init limit 3, 0 cause 3, 3 means that can be only 3 in the map.

or also use without the init limit:
SPAWN:NewWithAlias("template_name", "in_game name")

instead of SPAWN:New()

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...