Jump to content

jakkob4682

Member
  • Content Count

    252
  • Joined

  • Last visited

  • Medals

Everything posted by jakkob4682

  1. Any idea's on a work around for the getting stuck issue? also I saw a variable in the wiki but I'm not sure how to use "ALICE_populationActive" = _array the array consists of units that are outside(eliminates the chance of selecting a stuck unit but not sure how to use it). So close to getting a release version of this script :( ---------- Post added at 21:45 ---------- Previous post was at 20:36 ---------- yet another problem..... when I setFriend to 0 for civ and west after the unit is selected and I order my guys to attack it say "Target that house"... wtf
  2. I'm unclear on how to use the variables stored in the town logics for ALICE i.e. "ALICE_populationActive" = _array(array of all ALICE civs outside), this is quite important for a script I'm developing as often times when I pick a random civ they're in a building and thats another issue in itself(stuck in floor, wont go outside, stuck in door ways etc.) so I need to filter out the ones that are outside but unclear on how to do this. Forgive me if this has already been discussed somewhere.
  3. 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
  4. 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)
  5. the triggers work, i still get the explosions, and the markers are there, but I can not see the ied model.
  6. Just want to say thanks for all the help/advice that I've gotten addicted to scripting lol and the best advice I've gotten so far is "Learn by doing" for all the people just getting into scripting.
  7. not entirely sure but I think thats what the portion of the _id in the script is for as I've been experimenting w/ this also(bout to check as a matter of fact) example: _unit = _this select 0; _target = _this select 1; _id = _this select 2; //assuming _unit and _target are defined if (condition) then {_id = some function within the script;_action = _unit addAction ["name","_scriptName",true,true,1,(_this select 2 == something)]}
  8. I have a script that I want to use in an addAction the problem is the script has several functions that check rank and class type and if the conditions are met then it lets you choose one of two loadouts. I do not know how to check boolean from a script inside the init of a unit in the editor though. i.e.
  9. MoveWP = { _grp = _this select 0; _pos = _this select 1; _newWP = _grp addWaypoint [_pos,0,1]; _newWP setWaypointStatements ["true","whatever you want to happen when waypoint is complete"]; _newWP setWaypointType "MOVE"; sleep .01; _newWP setWPPos getPos _pos; } then on another line use a condition check to initiate the MoveWP function where _grp is the group name and _pos is the position you want to move the WP to. //while {condition} or waitUntil{condition} or if(condition) then {} followed with [razor,box] call MoveWP
  10. To start - I have all applicable dlc's and addons needed for the correct ied models and havent had any script changes to it til today after I noticed this issue. I have triggers attached to each ied which still work, the explosion still fires but no model for the ied is there. Using - 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 0 to _iedCount do { _iedPos = [_lPos,_iedCount * floor(round(random(_lcount^2))),random 360]call BIS_fnc_relPos; _ied = createVehicle ["Land_IED_V1_PMC",_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"; }; tested with the other two equivalents for the class and still no luck "BAF_IED_v1","PMC_IED_V1" still no model.
  11. No they are getting stuck in the ground like they ALICE is setPos'ing them w/ a z of -3 ---------- Post added at 04:57 ---------- Previous post was at 04:14 ---------- this is in the rpt caused by the stuck alice civs,which using the findSafePos might be able to fix however I am not very familiar with the function, and from some of the posts I have read on it, if the function doesn't return a good position then it uses the startPosition in the config for that map, which in most cases if not all is the center.
  12. 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)
  13. tested - has no effect that I could tell still sometimes get stuck units and sometimes it still selects a woman who gets stuck in an animation
  14. Have another problem, when I createUnit at the selected Pos alot of times the unit gets created in a stuck pos usually in floor or ground.
  15. Lets say I want to create a loadout that is based off the players rank and the script that is called has three different functions inside, one for ranks between Private and Sergeant, one for Sergeant to Lietenants, and one for Majors and Colonels. how then I would call each of those functions in the addAction parameters? Here's the code:
  16. sweet thanks trying to use this in place of a defined number for a scripted trigger for ied's/suicide bombers to make it more realistic, going to do some more digging to see what the sensitivity range for mines/ied's if there is an entry for that
  17. Can someone break it down barny style how I would actually go about using these? I.E. If I wanted to check the displayname for a unit or check if a location is a secondary airport etc. How do you reference the variable with these commands?_isMan = getText(configFile>>"CfgVehicles">>"Land">>"Man">>"displayName") but would I then use if(_x getText == "Takistani")?
  18. AT's are weapons so you could just use addWeapon "_ATclassName" if i'm not mistaken
  19. Can someone break this down barny style for me. I.E. Lets say I want to get the screenname of an object?
  20. I'm creating a script that relies solely on the ALICE module, the reason I need to know if it is a man or woman is because I need to arm the unit and women can't carry weapons.
  21. will try that at the moment i think using a spawned unit using createUnit in place of just picking an ALICE spawned unit is the best option as there are fsm and ai issues when trying to take control of the selected unit. Trying to figure out how to select a unit that isn't spawned in a stuck position now(think using a delay between the select command and createUnit command is the solution still need to check).
  22. @F2 yes, I did, the problem is that some of the AI spawn "in" an objects(i.e. their legs are buried in concrete or stuck in a wall). @Nimrod_Z - doesn't work with ALICE spawn units I still get women selected from the array randomDude = { _randomSelection = objNull; _men = nearestObjects [player,["CAManBase"],300]; _randomGuy = False; { if (_x isKindOf "Woman") then { _men = _men - [_x]; } else { if ((_x isKindOf "TAKISTANI")&&(_x distance player < 150)) then { _randomSelection = _men select (ceil(round(random count _men))); _randomGuy = True; }; }forEach _men; }forEach _men; _randomGuy }; I still get a woman sometimes for the selected unit. Thinking of going another route and using a getNumber function for the isMan entry
  23. so the preceeding entry is the object you're checking and the entry after that is the condition if I understand you correct. So if I wanted to check the indirect range of an explosion effect such as ACE_pipbombexplosion _xplosion = _this select 0; _explosive = typeOf _explosion _IHR = if( getNumber(configFile>>"configAmmos">>"Explosion">>_explosive>>"indirecthitrange") < 5) then {true} else {false}; if (_IHR) then {} else {}; ?
  24. so if I wanted to get the indirect hit range of an explosion _dangerZone = getNumber(ConfigFile>>"CfgMagazine">>"Explosion">>_explosive>>"indirecthitrange")? then check it in a function with if (_dangerZone > someNumber) then {}?
×