jakkob4682
Member-
Content Count
252 -
Joined
-
Last visited
-
Medals
Everything posted by jakkob4682
-
[WIP] Random Suicide Bomber Script(Using ALICE MODULE)
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
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.
-
Models not showing for IED's created in script
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
Models not showing for IED's created in script
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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) -
How to use: setWaypointPosition
jakkob4682 replied to Joe98's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
:) learn by doing -
Models not showing for IED's created in script
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
the triggers work, i still get the explosions, and the markers are there, but I can not see the ied model. -
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.
-
Multiple instances of addAction
jakkob4682 replied to Valfunction's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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)]} -
Selectable Loadout based on rank and classType?
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
How to use: setWaypointPosition
jakkob4682 replied to Joe98's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
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.
-
[WIP] Random Suicide Bomber Script(Using ALICE MODULE)
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
Models not showing for IED's created in script
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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) -
[WIP] Random Suicide Bomber Script(Using ALICE MODULE)
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
[WIP] Random Suicide Bomber Script(Using ALICE MODULE)
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
possible to call addAction with a script that has different functions?
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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: -
how to use config commands?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 -
how to use config commands?
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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")? -
How can i insert visible items in backpacks? (like light at's)
jakkob4682 replied to carlos2912's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
AT's are weapons so you could just use addWeapon "_ATclassName" if i'm not mistaken -
getting info from the config and then comparing that to another object how to
jakkob4682 posted a topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Can someone break this down barny style for me. I.E. Lets say I want to get the screenname of an object? -
how to tell if unit is a man or woman?
jakkob4682 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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. -
how to tell if unit is a man or woman?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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). -
how to tell if unit is a man or woman?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
@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 -
how to use config commands?
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
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 {}; ? -
getting info from the config and then comparing that to another object how to
jakkob4682 replied to jakkob4682's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
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 {}?