Home   Help Search Login Register  

Author Topic: BAS f (Mission Development Framework) v1-4-2  (Read 10068 times)

0 Members and 1 Guest are viewing this topic.

Offline ferstaberinde

  • Members
  • *
  • I'm a llama!
Re: BAS f (Mission Development Framework) v1-3
« Reply #30 on: 14 Mar 2009, 00:10:37 »
UPDATED INFORMATION

BAS f v1-4-2 RELEASED
With support for ACE v1.04 + ACEIP v1.12
For more information and download links, please see the biki page:
http://community.bistudio.com/wiki/BAS_f

Please can someone update the BAS f resource here as well? Many thanks in advance :)

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: BAS f (Mission Development Framework) v1-4-2
« Reply #31 on: 14 Mar 2009, 12:36:02 »
Updated.
try { return true; } finally { return false; }

Offline ferstaberinde

  • Members
  • *
  • I'm a llama!
Re: BAS f (Mission Development Framework) v1-4-2
« Reply #32 on: 15 Mar 2009, 03:14:47 »
Many thanks :)

Offline Knight Trane

  • Members
  • *
Re: BAS f (Mission Development Framework) v1-4-2
« Reply #33 on: 30 May 2009, 07:51:56 »
Hi ferstaberinde,

I've been makindg some small missions with BASf for the last few weeks and I have a question about the FIFO body remover sqf.
Quote from: BAS f Manual / AUTOMATIC BODY REMOVAL (FIFO VERSION)
A key limitation of this component is that it cannot automatically add the event handler to
units which are created dynamically during the mission (for example, if you use a script to
generate enemies or civilians dynamically). However, you can add the event handler by
ensuring that any dynamically-created units have the following code in their Init: line:


this addEventHandler ["killed",
{
if (local BAS_Server_Logic) then
{
f_abrFIFO = f_abrFIFO + [_this select 0];
} else
{
_this execVM "f\common\f_abrAddToFIFO.sqf"
};
}];

I'm creating AI throughout the mission with arrays and "call compile and create".
this is one of the arrays:
Code: [Select]
_embsyUSMCrt = createGroup west;

_ebassySec_setup = [];
//[["unit name", [create unit array], setdir, ["disableAI"], "setUnitPos", allowFleeing, "setBehavior", [final pos],]];
//************************USMC   Rooftop  snipers**************************************
_ebassySec_setup = _ebassySec_setup + [["eUSMCrt",["ACE_USMC0302",getPos USMC,[],0,"seargent"],270,["MOVE","TARGET"],"up",0,"AWARE",[5072,6527.25,36.8],"_embsyUSMCrt"]];
_ebassySec_setup = _ebassySec_setup + [["eUSMCrt1", ["ACE_USMC0302",getPos USMC,[],0,"seargent"],90,["MOVE","TARGET"],"up",0,"AWARE",[5086.58,6526.51,36.8],"_embsyUSMCrt"]];

{
//Create your unit in group _embsyUSMCrt with createUnit array.
call compile format["%1 = %2 createUnit %3;",_x select 0,_x select 8,_x select 1];
//Assign your unit to the group _embsyUSMCrt.
call compile format["[%1] join %2;", _x select 0,_x select 8];
//Set unitys INIT field
call compile format["%1 setVehicleInit ""%1 = this;"";",_x select 0];
//Set the direction your unit faces when created.
call compile format["%1 setDir %2;", _x select 0, _x select 2];
//Disable unit atributes.  "MOVE" ,"TARGET" ,"AUTOTARGET" , and"ANIM".
_disableAINumElements = count (_x select 3);
for [{_i = 0}, {_i < _disableAINumElements}, {_i = _i + 1}] do {
call compile format["%1 disableAI ""%2"";", _x select 0, (_x select 3) select _i];
};
//Set stance of unit you created.  "UP", "DOWN", and "MIDDLE".
if ((_x select 4) != "") then {
call compile format["%1 setUnitPos ""%2"";", _x select 0, _x select 4];
};
//Sets the level of courage you unit has.  0-1, "0" max courage.  "1" min courage and runs at the sight of emeny.
call compile format["%1 allowFleeing %2;", _x select 0, _x select 5];
//Checks if element 7 is empty.  If not then set units behavior to whats entered.
if ((_x select 6) != "") then {
call compile format["%1 setBehaviour %2;", _x select 0, _x select 6];
};
//Sets unit in final position ready to fight.
call compile format["%1 setPos %2;", _x select 0, _x select 7];

} foreach _ebassySec_setup;
//selects leader of given group.
call compile format["_embsyUSMCrt selectLeader %1;", (_ebassySec_setup select 0) select 0];

_ebassySec_setup;

I know the setVehicleInit command, but every time I try to use it in this script I get all kinds of errors.  I know it has to to do with the "quotes".  

This is what I think it should be:
Code: [Select]
call compile format["%1 setVeicleInit ""this addEventHandler [""killed"",
{
if (local BAS_Server_Logic) then
{
f_abrFIFO = f_abrFIFO + [_this select 0];
} else
{
_this execVM ""f\common\f_abrAddToFIFO.sqf""
};
}];"";", _x select 0];

Anyone have any thoughts?