Jump to content

Sign in to follow this  
1para{god-father}

How to Spawn then set the groups Ini

Recommended Posts

Trying to spawn in a group and then set the Ini for the Leader, but just cannot get it to work , can anyone please advise me where I am going wrong ?

_enemyCount=12
_name=dubrovkaspawn
_grpbuild1 = [getPos _name, east, _enemyCount] call BIS_fnc_spawnGroup;

_grpbuild1 setVehicleInit "_grpbuild1 execVM "PlaceInBuilding.sqf";
processInitCommands;

Share this post


Link to post
Share on other sites

edit: never mind I didn't read your code right the first time.

re-edit:

Your trying to use setVehicleInit on a group, it just needs to run on the leader.

_enemyCount=12
_name=dubrovkaspawn
_grpbuild1 = [getPos _name, east, _enemyCount] call BIS_fnc_spawnGroup;

[color="Red"]leader _grpbuild1[/color]  setVehicleInit "_grpbuild1 execVM "PlaceInBuilding.sqf";
processInitCommands;

---------- Post added at 06:46 AM ---------- Previous post was at 06:22 AM ----------

Also I dont think you really need to use setVehicleInit in this case, if this script is running on the server where the AI is local then you can just exicute the command strait out.

_grpbuild1 execVM "PlaceInBuilding.sqf";

If the script is not running on the server, then you could use the CBA event system or public variable eventhandler to execute the PlaceInBuilding.sqf.

Edited by Riouken

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  

×