Unit Spawner Script

主页 > 用户文件 > Unit Spawner Script
DCS World 2.8
其他

Unit Spawner Script

类型 - 其他
上传者 - Odskee
日期 - 2023-06-10 16:36:13
Custom LUA Script using Moose to spawn units in places where the Mission Editor won't let you, such as oil rigs, coastlines, etc. by placing zones.

Spawn any ground unit in any location just by placing a specially named trigger zone.  Demo mission (Caucasus) included.  This script uses the Moose framework.

HOW TO USE
---------------
Important:  This script relies on Moose and you must have this added as usual, see Moose documentation for more info.

1) Add the desired unit anywhere in your mission and configure it as intended (orientation, tasking etc.) - you must set Late Activation to true for each unit you add.  You can add as many as you like.  Note: name the unit something sensible.  These are your "Template Units"

2) To spawn the unit, create a small quad point trigger zone for each unit you want spawned (regardless of unit type).  Note that units are spawned randomly within the zone border, the bigger the zone the more variation in starting position.  IF YOU HAVE NOT MODIFIED the Lua script, your Trigger Zone must start with "SpZone_", followed by the exact name of the template unit you chose in step 1, and terminated with "_0001" where this number increments for each Trigger Zone you add for that unit.  Note the final increment MUST BE 5 characters long, no more no less.

3) Create a new Trigger in your mission, set the condition to Time More with a value of 2 seconds and an action of Do Script File, attaching this Lua script.

Note: If you wish to use a different Zone Prefix for whatever reason, you will need to modify Line 14 of the lua script and set this accordingly.

EXAMPLE
-----------
To spawn 2 SA-15 Tor's on an Oil Rig, you would:
1) Add ONE SA-15 anywhere on the map and tick Late Activation.  Set it's orientation and other options as you prefer.  Name this unit "Rig_SA15".
2) Add your Oil Rig platform as usual.
3) Create 2 small Quad Point trigger zones and place them where you want the SA15's to spawn on the oil rig.  Name the first zone "SpZone_Rig_SA15_0001" and the second zone "SpZone_Rig_SA15_0002".
4) Add both Moose and UnitSpawner.lua to your mission, ensuring Moose loads first.
5) Profit....


DEMO
---------
A small demo mission on the Caucuses is also included, showing how to spawn 3 different unit types twice (total of 6 units spawn).
  • 许可: 免费 - 免费版, 无分发限制
  • 语言: 英文
  • 大小: 1.14 Mb
  • 下载数: 192
  • 评论: 0
标签: oil rigs, Spawning
  • 评论
载入评论……
关注我们