Jump to content
Snail was here

reinforcing dead squadmates for SP script or anything that is similar?

Recommended Posts

Im new to Mission editor and I am trying to create a mission where you have to kill a huge amount of enemy to win, You will start with 6/8 man squad and start to hunt down enemy troops in the huge map with no waypoints. The thing is, 6/8 man will not be enough but more man than that will be hard to handle. There will be alot of casualty in your squad so I need a script (or anything similar) to reinforce your dead squadmate by going to the medical tent or barrack.

Share this post


Link to post
Share on other sites

Searched for "reinforcements" here or at OFPEC?

It turns up threads like this.

A simple way, provided you can leave individual units somewhere safe (maybe mark it on the map) is to add the following to their Init line in the editor:

this addAction ["Join my group", "join.sqs"]

;Join.sqs
_man = _this select 0
_action = _this select 2
_presser = _this select 1

IF (count units _presser >= 9) THEN {hint "You have too many units!"; exit}
_man removeaction _action
[_man] join _presser
_man groupchat format ["%1 reporting for duty, sir.", name _man]
exit

Change the number after "count units" to whatever you want as a group size (including the player). The maximum number of groups on any side is 63 - so you can have the player's group and 62 individual reinforcements.

Advantages:

You specify the type of unit; and the player should be able to recognise this and decide if they want them to join his group.

Disadvantages:

Lots of individual units stuck waiting where-ever, hopefully out of the way of the enemy.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×