Comrades in Arms Discussion Board

Full Version: Simple_Reinforcements.fsm - a simple way to incorporate some random reinforcemen
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi !

While i was playing around with the FSM Editor i had the idea for a simple reinforcements script that takes away the stress of adding and setting up all those waypoints for reinforcement units.
All you have to do is to place one or more markers from which the script will choose one randomly and the unit or group will reinforce this position if you call the script.
You can have differend markers for differend types of reinforcements (air, infantry ect.) or use the same for multiple units.
Its nothing complex and you may ask why i used a .fsm if you can do a similar script in .sqf...the answer is i just wanted to try .fsm !

IMPORTANT:
This script does not spawn units, you have to place them in the editor !
You have to name you markers this way -> marker1,marker2 and marker3 for example, now you only need to tell the script the basic markername ("marker") and the number
of markes you placed (which would be 3 in this example) !

The behaviour and formation is also randomly choosen (needless to say stuff like SAFE or LIMITED is not used) but for vehicles and air units the behaviour is always AWARE, YELLOW and speedMode NORMAL !
To randomize the presence of the unit just use the "probability of presence" slider in the unit menu, the script will terminate without showing a error if the unit is not present !

Call with:
handle = [unitname,"markername",3,"WPTYPE",100,0,1] execFSM "Simple_Reinforcements.fsm";
  • unitname = the name of the unit or the name of the groupleader

  • "markername" = the name of your markers without number
  • 3 = that would be the number of markers you placed

  • "WPTYPE" = (OPTIONAL) the type of the waypoint the unit gets, can be SAD (default), HOLD or GUARD. SAD is combined with a CYCLE WP so the units keep searching for enemys at the WP location

  • 100 = (OPTIONAL) the size of the radius around the randomly choosen marker in which the WP is randomly placed (default = 200)

  • 0 = (OPTIONAL) the altitude for air vehicles, 150 is default and 100 is minimum but you can choose a higher one if you like

  • 1 = (OPTIONAL) this will activate a hint that shows you which marker was choosen and also gives a hint if the unit not exists or is already dead at the time the script is called (default = 0)

CBA version:
I made a version that uses the great CBA_fnc_taskPatrol for infantry with SAD as [COLOR="DarkOrange"]"WPTYPE"[/COLOR].
Remember that infantry set to SAD will now use the [COLOR="Gray"]radius[/COLOR] to determine the size of the area they will patrol around the marker !
Vehicles and air units still use a SAD + CYCLE WP combination !
And obviously you will need the CBA mod to use this version of the script !


A simple setup could look like this:
[Image: unbenanntddumi.jpg]
The trigger would call the script and the units would each choose one of the three markers randomly and reinforce this position.


DOWNLOAD v1.2:
http://www.file-upload.net/download-3872...s.fsm.html

DOWNLOAD v1.2 CBA version:
http://www.file-upload.net/download-3872...A.fsm.html
Oh... how I wish I had time to get into mission editing again. I would make wonders with this scripts! Nice work Wiggum.