Jump to content
Sign in to follow this  
SteelSampson

Createunit single unit?

Recommended Posts

createCenter west;

wgroup1 = createGroup west;

dude = "US_Soldier_EP1" createUnit [getMarkerPos "base", wgroup1];

I understand that the above works... but I am needing to spawn a lone, individual, non-grouped unit.

Is this possible?

**Just realized I posted in the wrong section I apologize. If a moderator would like to move it that would be great. Thanks.

Edited by SteelSampson

Share this post


Link to post
Share on other sites

No. Every unit is in a group, whether it's a group of one or one hundred.

Share this post


Link to post
Share on other sites

I am running into an issue that could have this title, so i will post it here. I am running the following script triggered by a present blufor trigger. The problem is, when i am hosting locally, it runs fine, a single ai unit spawns. However, when i run it on my dedicated server, it spawns 2 ai units every time.

trigger init

nul = [getMarkerPos "spawn1", t1] execVM "spawns.sqf";

spawns.sqf

private ["_pos", "_group"];
_pos = _this select 0;
_group = createGroup east;

onee = _this select 1;
//_one = format onee;
if (on == "on") then {
//"O_Soldier_F" createUnit [_pos, _group, "this setdamage .3"];
unit = _group createunit ["O_Soldier_F", _pos,[],1,""];
unit setdamage .4;
};

//turn off trigger. Reset by On.sqf.
onee setTriggeractivation ["civ", "present", true];

on.sqf

on = "on";

t1 setTriggeractivation ["west", "present", true];
t2 setTriggeractivation ["west", "present", true];
t3 setTriggeractivation ["west", "present", true];
t4 setTriggeractivation ["west", "present", true];
t5 setTriggeractivation ["west", "present", true];
t6 setTriggeractivation ["west", "present", true];
t7 setTriggeractivation ["west", "present", true];
t8 setTriggeractivation ["west", "present", true];
t9 setTriggeractivation ["west", "present", true];
t10 setTriggeractivation ["west", "present", true];
t11 setTriggeractivation ["west", "present", true];
t12 setTriggeractivation ["west", "present", true];
t13 setTriggeractivation ["west", "present", true];
t14 setTriggeractivation ["west", "present", true];
t15 setTriggeractivation ["west", "present", true];

Off.sqf

on = "off";

Share this post


Link to post
Share on other sites

Put this into the triggers condition field: "this && isServer".

To deactivate a trigger, use "NONE" as the activation, not another side :D

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  

×