Welcome to the Iron Front Fan Forums!
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 458
Reply with quote  #1 
Hiya ~ I've got what must be a classically simple solution/problem:

Bis_fnc_spawnVehicle - spawns my units,
I have created groups from these, but how do I add an Init to each member of a group?

 Here's the basics:

createunits.sqf:

_grptank = creategroup Resistance;
[getmarkerpos "tankspawn1", 98, "LIB_M4A3_75", _grptank] call BIS_fnc_spawnVehicle;


and here's later in the same script where I try and call the init:

{ _x setVehicleInit "nul = [this] execVM "scripts\m4_sandbags.sqf""; } forEach units _grptank;
processInitCommands;
 

Not working - any pointers?

__________________
Mission Repository - http://www.missionrepository.com

0
Gunter Severloh

Avatar / Picture

Admin
Registered:
Posts: 2,757
Reply with quote  #2 
You may have to use an init.sfq script idk. Rydygier could better tell you or someone else that knows scripting.
__________________
0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 458
Reply with quote  #3 
I hope so - combined with some IF Tank Rider's they should look pretty cool rumbling  en-masse into the action from nowhere : -) 
__________________
Mission Repository - http://www.missionrepository.com

0
sweofp

Private
Registered:
Posts: 9
Reply with quote  #4 
_securityGroupCenter4 createCenter west;
_securityGroup4 createGroup west;

_securityUnit4a _securityGroup4 createUnit ["US_Soldier_Marksman_EP1",_sniperpos1, [], 1.0"none"];
_securityUnit4a setVehicleInit "this setUnitPos 'MIDDLE';this disableAI 'MOVE'";

_securityUnit4b _securityGroup4 createUnit ["US_Soldier_Marksman_EP1",_sniperpos2, [], 1.0"none1"];
_securityUnit4b setVehicleInit "this setUnitPos 'MIDDLE';this disableAI 'MOVE'";

processInitCommands

Found this, see if it helps you? Of course you have to change the names and stuff to your names....
0
Foxsch

Avatar / Picture

Colonel
Registered:
Posts: 458
Reply with quote  #5 
Hi sweofp - thanks for the pointer - I tried the various combinations:

grp setVehicleInit "null = [grp] execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
/////////////////////////////////////
grp setVehicleInit "null = [this] execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
////////////////////////////////////
grp setVehicleInit "this = execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
/////////////////////////////////////
grp setVehicleInit "grp = execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
/////////////////////////////////////


still no luck ~ from your tip, it should be working......................

also tried:

grp setVehicleInit "[grp] = execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
/////////////////////////////////////
grp setVehicleInit "[this]  = execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
////////////////////////////////////


and:

grp setVehicleInit "execVM 'scripts\m4_sandbags.sqf'";
processInitCommands;
/////////////////////////////////////


I am missing something so obvious I am going to kick myself I know it ~

The group name is correct btw (earlier post: _grptank)

__________________
Mission Repository - http://www.missionrepository.com

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.