Jump to content
Sign in to follow this  
jakkob4682

Models not showing for IED's created in script

Recommended Posts

private ["_iedCount","_ied","_trig","_mrk","_city","_lPos","_lArray","_lCount","_iedPos"];

loc = locationNull;
CityCenter =
{	

private ["_city"];
_unit = _this select 0;
_city = false;
   {
       if (side (leader _x)==west) then {
		_unit = leader _x;
		loc = nearestLocation  [getPosATL (leader _x),"CityCenter"];
		_city = true;
		};
}forEach allGroups;
_city 
};
_city = [] call CityCenter;
waitUntil {_city}; 
_iedCount = 0;
_lPos = locationPosition loc;
_lArray = nearestObjects [_lPos,["SoldierWB"],300];
_lCount = count _lArray;
if (_lCount > 3) then {
_iedCount = _lCount * 4;
}
else
{
	if (_lCount >= 4) then {
		_iedCount = _lCount * 3;
		};
};
for "_i" from 1 to _iedCount do 
{
	_iedPos = [_lPos,_iedCount * floor(round(random(_lcount^2))),random 360]call BIS_fnc_relPos; 
	_ied = createVehicle ["BAF_ied_v1",_iedPos,[],0,"NONE"];
	_trig = ([getPosATL _ied, "AREA:", [3,3, 0, false], "ACT:", ["WEST", "PRESENT", False],"STATE:",["this","deleteVehicle (thisTrigger getVariable ['ied',objNull]); createVehicle ['Ace_MineExplosion',getPosATL thisTrigger, [], 0, 'NONE']",""]] call CBA_fnc_createTrigger) select 0;
	_trig setVariable ["ied",_ied];
	_mrk = createMarker[format ["ied_%1",random 1000],_iedpos];
	_mrk setMarkerShape "ICON";
	_mrk setMarkerType "DOT";
};

haven't changed anything in script and it was working last week

Share this post


Link to post
Share on other sites

any idea's? and yes I have all applicable expansions enables as well as the latest version of ace, no changes to any files between now and when I first started working on this script(~one week ago)

Share this post


Link to post
Share on other sites

It's working here as is, You need at least four units in a group for it to work.

Although I'm not sure about this bit

if (_lCount > 3) then {

_iedCount = _lCount * 4;
}

I think it should be

if (_lCount <= 3) then {
_iedCount = _lCount * 4;
}

It kind of depends how many units you want to check for.

Edited by F2k Sel

Share this post


Link to post
Share on other sites

the triggers work, i still get the explosions, and the markers are there, but I can not see the ied model.

Share this post


Link to post
Share on other sites

_ied = createVehicle ["BAF_ied_v1",_iedPos,[],0,"NONE"];

_ied setposatl [(getpos _ied select 0),(getpos _ied select 1),0];

place this second line just after the createvehicle line in your script .

Some object will show up without the setposatl line and others don't.

Share this post


Link to post
Share on other sites
_ied = createVehicle ["BAF_ied_v1",_iedPos,[],0,"NONE"];

_ied setposatl [(getpos _ied select 0),(getpos _ied select 1),0];

place this second line just after the createvehicle line in your script .

Some object will show up without the setposatl line and others don't.

found the problem - some how my A.C.E. addon that I was using(1.14 rc1) got deleted and I believe the models are ACE models that were being used so updating A.C.E. now

I'm trying to include this in the suicide bomber script but don't quite understand how to use the variable from ALICE to run this yet. Theres a variable for townlists which I believe is the key to putting this together.

---------- Post added at 18:37 ---------- Previous post was at 18:13 ----------

this is in the wiki but I would go about using this to call the ied script?"ALICE_populationActive" = <array>; - list of all active civilians in town (e.g. civilians who are outside)

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  

×