Search the Community
Showing results for tags 'getpos'.
Found 8 results
-
getPos of EVERY object in an array and createVehicle on EVERY position in that array?
RabbitxRabbit posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am trying to create a script for an incendiary bomb that sets fire to all objects within a 20m radius. So far, this is what I have: _objectList = nearestObjects [bomb1, [], 20]; //this creates an array "_objectList" of all objects within 20m of object "bomb1" _posArray = []; //this creates an array "_posArray" of the positions of each object in the previous array "_objectList" { _pos = getPosATL _x; _posArray pushBack _pos; } forEach _objectList; All of that works. What I can't figure out is how to create a fire on each position in the array "_posArray". I can create a fire on any ONE of the positions, using this: "test_EmptyObjectForFireBig" createVehicle (getPos (_objectList3 select index)); // where "index" is the index number of any one of the positions in the array _posArray" But I don't know how to create a fire on EVERY position. Thank you in advance for any help! -
Hello there i'm having issues with BIS_fnc_relativeDirTo (the purpose is to create a boomerang system that will have a animated led 3d model in my HMMWV's like my crewduke) , my problem is that it is spamming some random 90, 180, 270 values... (maybe not random but i don't get why i got those values) here is a video (don't mind the generic error i've added a sleep in a unscheduled environment but the detection weirdly seems to work better (Probably just a placebo effect i think^^)) As you can see i have some random values coming in... Video showing my problem For now the script is init by a module (Will add action to add it and activate it later): /* sys_boomerang_animate.sqf Author(s): MrEwok Description: This Animate (for now) the boomerang system and run Boomerang script collection. Note : None. FilePath: \EWK_Boomerang_System\Scripts\sys_boomerang_animate.sqf */ _car = _this select 0; _car animate ["SYS_boomerang", 0]; ////////////////////////////////////////////For Boomerang System/////////////////////////////////////// [_car] execVM "\EWK_Boomerang_System\Scripts\Ewk_Boomerang_Eh.sqf"; waitUntil {!alive _car}; _car animate ["SYS_boomerang", 1]; [_car] execVM "EWK_Boomerang_System\Module\boomerang\sys_boomerang_animate.sqf"; And then it run this script : /* Ewk_Boomerang_Eh.sqf Author(s): MrEwok Description: This Apply FiredNearEH for Boomerang detection. Note : None. FilePath: \EWK_Boomerang_System\Scripts\Ewk_Boomerang_Eh.sqf */ ///////////////////////////////////////////For Boomerang System/////////////////////////////////////// /* this addEventHandler ["FiredNear", { params ["_unit", "_firer", "_distance", "_weapon", "_muzzle", "_mode" , "_ammo", "_gunner"]; }]; */ vclBoomerang = _this select 0; vclBoomerang addEventHandler ["FiredNear", { if ((_this select 2) < 100/*Need To Adjust*/) then { _Shooter = _this select 0; _gunner = _this select 7; hint str _gunner; { _relDir = [_Shooter, vclBoomerang] call BIS_fnc_relativeDirTo; if ( _relDir > (_x select 0) && _relDir < (_x select 1) ) then { sleep 0.5; // This is the Generic error in the video... systemChat format["Shooter is at %1 from the Vehicle",(_x select 2)]; systemChat str _relDir; }; }forEach [ ///////////////////////////////////////////This Was Working but not precise enough/////////////////////////////////////////// /* !!!Basic detection system decrepited!!! [45, 135, "to the right of"], [135, 225, "behind"], [225, 315, "to the left of"], [315, 360, "infront"], [0, 45, "infront"] */ ///////////////////////////////////////////This Was Working END/////////////////////////////////////////// [0, 15, "12 oclock"], [-0, -15, "12 oclock"], //0 = 12 donc 0 a 15 [15, 45, "1 oclock"], [-15, -45, "1 oclock"], //30 = 1 donc 15 a 45 [45, 75, "2 oclock"], [-45, -75, "2 oclock"], //60 = 2 donc 45 a 75 [75, 105, "3 oclock"], [-75, -105, "3 oclock"], //90 = 3 donc 75 a 105 [105, 135, "4 oclock"], [-105, -135, "4 oclock"], //120 = 4 donc 105 a 135 [135, 165, "5 oclock"], [-135, -165, "5 oclock"], //150 = 5 donc 135 a 165 [165, 195, "6 oclock"], [-165, -195, "6 oclock"], //180 = 6 donc 165 a 195 [195, 225, "7 oclock"], [-195, -225, "7 oclock"], //210 = 7 donc 195 a 225 [225, 255, "8 oclock"], [-225, -255, "8 oclock"], //240 = 8 donc 225 a 255 [255, 285, "9 oclock"], [-255, -285, "9 oclock"], //270 = 9 donc 255 a 285 [285, 315, "10 oclock"], [-285, -315, "10 oclock"], //300 = 10 donc 285 a 315 [315, 345, "11 oclock"], [-315, -345, "11 oclock"], //330 = 11 donc 315 a 345 [345, 360, "12 oclock"], [-345, -360, "12 oclock"] //360 = 12 donc 345 a 360 ]; }; }]; Please help me! I don't wan't to release my mod without that feature even if it's a little bit harsh (in fact i could already add the boomerang v2 and say "it's the V2 V3 is better ... but i wan't to add a real V3 and make an alternative version for V2 that's add some kind of randomness if some mission maker want to make it harder ). I can provide more info if needed (config or basic models with cfg and cpp to reproduce...)...
- 11 replies
-
- bis_fnc_relativedirto
- ewk
- (and 6 more)
-
BIS_fnc_inAngleSector - Approximated position [help needed]
Dj Rolnik posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys, I am working on a mission which utilizes a script allowing the players to shout to civilians based on distance and angle from the civie. Whenever the civilian is within a given radius and a specific angle from the player, then the latter receives an action allowing him to shout commands etc. The script works fine and all, but I am seeing a problem where the action appears/reappears pretty randomly when the civilians are running/moving OR RATHER when there are obstacles and uneven terrain around. I believe that the BIS_fnc_inAngleSector , which is the condition for the addAction, keeps returning an exact position of the civilian and when he keeps moving, changing altitudes or when there are objects around, the function just loses track and makes the action appear/disappear pretty randomly. I may be wrong on this but that's the only thing that comes to my mind. That's for the context. Now whe actual question I have is: do you think it's possible to feed some kind of modified position array of the civilian, so that it will search "around" his actual position? player nearEntities [ "MAN", _radius ] select { side _x isEqualTo civilian && { [ getPosATL player, getDir player, _angle, getPosATL _x ] call BIS_fnc_inAngleSector } } Thanks a lot! Adam-
- bis_fnc_inanglesector
- getpos
-
(and 3 more)
Tagged with:
-
Helicopter move getPos - sitting still
Dj Rolnik posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys, I am in need of a clever explanation of what I'm seeing and a helpful hand with fixing it. I have created an action that calls for a chopper from a nearby location and makes it move and land in a different location. The script works locally without issues. The script works in multiplayer when called using the Zeus code module option. The script does not work when called by addAction (either attached to a player or a static object). By "does not work" I mean the helicopter does receive the cargo (which means it is recognised) but the chopper just sits there forever. ["Land_PaperBox_01_small_closed_brown_IDAP_F", helicopter1] call ace_cargo_fnc_addCargoItem; ["Land_PaperBox_01_small_closed_brown_IDAP_F", helicopter1] call ace_cargo_fnc_addCargoItem; ["Land_PaperBox_01_small_closed_brown_IDAP_F", helicopter1] call ace_cargo_fnc_addCargoItem; ["Land_PaperBox_01_small_closed_brown_IDAP_F", helicopter1] call ace_cargo_fnc_addCargoItem; hint "Friendly chopper incoming"; helicopter1 move (getPos heli_landing_pad); sleep 15; while { ( (alive helicopter1) && !(unitReady helicopter1) ) } do { sleep 1; }; if (alive helicopter1) then { helicopter1 land "LAND"; while { ( (alive helicopter1) && !(unitReady helicopter1) ) } do { helicopter1 engineOn false; }; }; For the love of me, I cannot understand why it keeps happening. I even called the helicopter1 move part individually from the zeus interface and it did work. Thanks a lot, Adam- 7 replies
-
- helicopter
- heli
- (and 6 more)
-
This thread should link here: Simple Radar Warning System Have fun!
-
hi, Is there a way to determine the position of a vehicle by vehiclevarname? I work on a survival server and want to save the positions even if the vehicle is moved without a driver. Many Thanks.
-
Tons of ideas for mission, zero knowledge about scripting.
Lukyz posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi fellas, is there a good soul which can help me with realizing my ideas for my mission? At least point me to the right direction. 1) I'm trying to figure it out how make a picture or object appear above the unit that spotted the player. I failed at very start because I don't know how to get the position of unit that spotted the player. One of my thoughts was: GetPos of unit that have knowsAbout bigger than 0 or maybe use targetKnowledge but I (again) don't know how. 2) I got a trigger with EAST knowsAbout player > 1; which launch script when player is discovered BUT even its set to repeat it works only once. 3) Is there any documentation about playerKilledScript.sqs because I don't find any. I would like to change the "dead" screen but still have few options like exit, load last save etc. Thanks in advance for any ideas + I can use very simple scripts and still don't have any clue how to combine them / use them together so any link to some tips or tutorials are also welcome. -
Need help with tracking where a side is on the map
Robin Withes posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, i am trying to make a script where every 10 minutes it will mark everyones location 3600 meters around a object, but ONLY if they are bluefor. I need some help with getting the playerlocation if the player matches to these criteria: player distance natoTracker < 3900 && player side == west This is what i have so far sleep 600; _natoDownSouth2 = nearestObjects [natoTracker, [What do i need to put here to only store bluefor players in the variable], 3600]; if (player distance natoTracker < 3900 && player side == west) then { [[1,format["NATO has been spotted down south and their location has been marked on the map."]],"life_fnc_broadcast",civilian,false] spawn life_fnc_MP; };