The Fighting 99th Air Wing

AIR : LAND : SEA : FIGHT!

Dynamic Ground Unit Spawner

7 years 11 months ago
shadow
New Member
New Member
Posts: 6
More
Topic Author
Dynamic Ground Unit Spawner #555
dynamic ground unit spawner

use the function unitSpawnZone(template group, starting zone, destination zone) with triggers
Attachments:

Please Log in or Create an account to join the conversation.

7 years 11 months ago
TracerFacer
Administrator
Administrator
Posts: 16
Karma: 1
More
Dynamic Ground Unit Spawner #3948
Made this its own thread

Please Log in or Create an account to join the conversation.

7 years 11 months ago
TracerFacer
Administrator
Administrator
Posts: 16
Karma: 1
More
Dynamic Ground Unit Spawner #3984
finally had a chance to play around with this..

very nice!!

The problem with the automan script is that once you set a unit active and respawning.. he respawns forever.. and you can't turn it off..

Now with this.. and the clever use of flags.. you can actually have respawning units on a front line.. that can be pushed back.. say you blow up a few of their command and control facilities and the front line spawning units stop spawning, and a new front line farther back starts spawning re-spawning units...

Lots of possibilities with the ability to control when a re-spawning unit re-spawns.

The only negative that I see (and I believe this is ED's fault) is that once the unit spawns.. he is crawling along at a snails pace... telling him to speed up doesn't do any good.. you have to give him a new path.. and from what I've noticed, if I give him any path that is similar to the one he is already on.. he still crawls... almost have to give him a 90 degree turn command then back to the course you want him to go.. and he'll speed up..

Clearly game pathing AI bugs. But be-aware if you expect them to travel any distance once spawned. You will have to GC them or put up with the slow pace.

Thanks again for this shadow.. gaining control over the re-spawning units has been a long standing wish for me.

It can be adapted for air units I'm assuming?

Please Log in or Create an account to join the conversation.

7 years 11 months ago
pyromaniac4002
New Member
New Member
Posts: 6
Karma: 2
More
Dynamic Ground Unit Spawner #3986

Instantly reminded me of:



Flags still getting the job done today.

Please Log in or Create an account to join the conversation.

7 years 11 months ago
shadow
New Member
New Member
Posts: 6
More
Topic Author
Dynamic Ground Unit Spawner #3988
Fixed the speed issue; it appears the ai went stupid and couldn't figure out how to get into the proper formation.

added provisions for aircraft but its not implemented yet

function now has new inputs,
unitSpawnZone(template group, starting zone, destination zone, speed, aircraft Check*, alt*)
*no function yet

speed is defaulted to 40 mph unless otherwise specified
Attachments:

Please Log in or Create an account to join the conversation.

7 years 8 months ago
shadow
New Member
New Member
Posts: 6
More
Topic Author
Dynamic Ground Unit Spawner #4855
Big update to the script,

Enabled heli and AC spawns.



Will copy attributes from template such as tanker and AWACS
Can set some waypoint tasks for AC such as orbit and landing
Attachments:

Please Log in or Create an account to join the conversation.

7 years 8 months ago
shadow
New Member
New Member
Posts: 6
More
Topic Author
Dynamic Ground Unit Spawner #4857
Some addtional documentation:
unitSpawnZone(templateName,startZone,targetZone,speedSet,airCheck,altSet,engage_radius,task,arriveAction,spec_name)

templateName = template unit you designate in ME, can be se to late activation to not clutter f2 view.

startZone = zone you want your units to spawn in

targetZone = zone you want your units to go to

speedset = how fast you wan your units to travel, I believe it is in KPH

airCheck = what category the units is in, 1 = plane; 2 = heli 3= ground unit: no support for ships just yet

altSet = altitude you want your units to travel at

engage_radius = range you want your CAP and CAS to engage

task = task of the aircraft, 'gnd' = cas, 'tanker' = tanker, 'AWACS' = AWACS, 'a2a' = CAP, be careful some planes will crash DCS if incompatible task is chosen.

arriveAction = what you want your unit to do once it reaches its destination. 'Land' = lands, 'orbit' =sets up a racetrack orbit between the spawn and destination, inputing '' will cause unit to RTB

spec_name = overrides the auto naming with a specific group name, useful for additional triggers or scripting.
Only tested on 2.0 so don't know if there is any bugs going to 1.5 but don't expect anything major. Will prob add more functions later, thinking it may work with moving zones/ beacons. Spawned tankers currently does not have tacan.

Please Log in or Create an account to join the conversation.

Time to create page: 0.129 seconds