Galm99 Posted September 24, 2018 Posted September 24, 2018 Hi all, i am currantly trying to create a basic online mission with enemy forces that respawn everytime they are destroyed. I have tried using mist, however it one seems to respawn the group once without fail.i am wondering if moose would be easier however I have never used it in a mission. Would moose achieve this easier? Thanks Matt. RAF Air UK Website http://www.rafairuk-dcs.co.uk/ Mike Alpha Tango's YouTube Channel http://www.youtube.com/channel/UC9oKDSVDDDErRVjRFqgu3bA Intel i7-6700k RTX 2080TI Gigabyte Z170-gaming K3 32gb DDR4 RAM Hotas Warthog CV1
Hardcard Posted September 24, 2018 Posted September 24, 2018 (edited) You should be able to do that with MIST, no need for MOOSE. However, if you're interested, here's one way of achieving this in MOOSE: TankSpawn = SPAWN :New( "Tank" ) -- "Tank is the name of the enemy group in ME-- :InitLimit( 5, 5 ) -- First value is the max. number of alive units allowed at any time. Second value is the max. number of alive groups allowed at any time.-- :InitRandomizePosition( true, 200, 50 ) -- "true" is a boolean used to enable spawn position randomization. The first number is the outer spawn zone radius in meters. Second number is the inner spawn zone in meters.-- :SpawnScheduled( 5, .5 ) --First number is the time interval between group spawns in seconds. Second number is the percentage or variation applied to that spawn interval, expressed in decimals. In this case, it's set to 50%-- Now, if you need this particular spawn scheduler to stop running at some point, this should do the trick: [b]TankSpawn[/b]:SpawnScheduleStop() If you then want to reactivate it later on, this should do it: [b]TankSpawn[/b]:SpawnScheduleStart() Basically, this will spawn a max. of 5 units, each one belonging to a separate group (so, 5 groups total, which are simply copies of "tank" group, defined in ME), in randomized positions. If any of the 5 units/groups is destroyed, a new one will spawn, making always sure that there are 5 units/groups active at any given time. I should warn you, though, if you want those spawned groups to be targeted by the script later on (in order to run some functions on them, for instance), additional steps would be required. This example only shows how to schedule and limit spawning in MOOSE. As I said, this is just one way of achieving this, there are others. Hope this helped :thumbup: Edited September 24, 2018 by Hardcard [sIGPIC][/sIGPIC]
Recommended Posts