Jump to content
Sign in to follow this  
zorilya

Join command issue with scripted units

Recommended Posts

I have been testing a simple free hostage script where the hostage joins the group of the unit who calls the action. works great on a unit added in the editor.

however this doesn't work when i script a unit into the world... the unit, when spawned stands as if holding a weapon but is unarmed and when i activate the action for him to join my squad, nothing happens.

I have tested this with civilians, opfor and blufor units.

any ideas?

Share this post


Link to post
Share on other sites

How are you "scripting" the unit?

The following commands should create a BLUFOR soldier in your squad.

_unit = group player createUnit ["B_Soldier_F", getPos player, [], 0, "FORM"];  

Edit:

I just reread your post. I would use the addAction command to the init of your "hostage" like follows:

this addAction ["Follow me!","followme.sqf"];

and then in your followme.sqf:

(_this select 0) join group (_this select 1);

Edited by skimmer8824

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
Sign in to follow this  

×