Search the Community
Showing results for tags 'check'.
Found 16 results
-
Hello ARMAtes. I need help with the next problem: _selectm = selectRandom ["rm01","rm02","rm03","rm04"]; _posm = getMarkerPos _selectm; sleep 1; This way I randomly pick what existing marker on the map will be used but I need the full circle to be completed without repeating already used ones. For example, if trigger tgrm_03 will be activated - the area of marker rm03 will be used to spawn some units and due to tgrm_03 being set to "enableSimulation false" after use, it will not be activated if the random system chooses it again accidentally but the script will stop seeking next one so units will not be deployed... What I want is to tell the script to choose only between triggers that are left untouched until I manually set them all to "enableSimulation true" again. Thanks in advance
-
Detect if vehicles engine is running
sarogahtyp posted a topic in Arma Reforger - Configs & Scripting
I try to get the state of a vehicles engine. What I tried so far is using the EOnPhysicsActive event of the vehicle: class SaRo_BMHQ_Hillbilly01_Class: Vehicle { override void EOnPhysicsActive(IEntity owner, bool activeState) { if (activeState) Print ( "Active."); else Print ( "Not active."); } }; This detects if the physics of the vehicle get simulated and therefore it fires on movement even if initiated by another entity like another car. It also fires on initialization. Question is: Is there a method to get the engines state and which method is it? -
Dedicated server check for player within vehicle
Depressed-66022b82dea61fee posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've been trying my best to get a script to work which allows a server to detect players within a specific vehicle. Here are the versions I've tested. They do not work on a dedicated server though. 1: {_x in object} count (playableUnits) == {alive _x} count (playableUnits); 2: _allPlayers = call BIS_fnc_listPlayers; {_x in object} count (_allPlayers) == {alive _x} count (_allPlayers); 3: {_x in object} count (allPlayers) == {alive _x} count (allPlayers); 4: ( {alive _x && !(_x in object)} count allPlayers ) == 0 I'm terrible at scripting but I try my best to understand. If you have a fix that is great, though I'd love to know how I messed up and how to improve for the future. :)- 11 replies
-
- multiplayer
- vehicle
- (and 4 more)
-
To make it simple i want it like this Mission 7, tonk can survive or be destroyed Mission 8 only triggers if tonk survives (i know how to do this) Mission 8, tonk is either stolen or destroyed Mission 9 is triggered if tonk is destroyed (skips over mission eight) Mission 9, >>>tonk appears in mission, depending on if it was stolen in mission 8, or destroyed<<< that is my question please help thanks
-
Check Car Inventory For A Specific Item
black_hawk_mw2_87 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, community, would you help me with a specific script? 🙂 I have created a task: the player must pick up his backpack from somewhere and must put it in his vehicle's inventory. I need a script that checks if this item is stored in the car's storage and to complete the task when it's confirmed. The class name of the backpack is: usm_pack_m5_medic. The class name of the car is: UK3CB_CHC_C_Hatchback. I guess the script should be like this: if... then... -> if the item is present in the inventory of the car, the task is successfully completed. Thank you in advance! Cheers! 🙂 -
scripting [SOLVED]Using MissionEventHandler "BuildingChanged"
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
How does one use the MissionEventHandler "BuildingChanged"? I'm currently trying to make it so that when a building is damaged (and changes into its partly damaged form) a trigger is activated and props inside the building are deleted. Unfortunately, I'm having real trouble getting the script to work. Please help!- 19 replies
-
- arma 3
- missioneventhandler
-
(and 2 more)
Tagged with:
-
scripting [SOLVED]Check Alive nearestObjects
rkemsley posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am currently trying to make it so that when a hold action is preformed on a crate, it will put the crate in the back of a non specific Zamak Truck. Currently, it will put the crate in the nearest Zamak Truck (destroyed or alive). I need it to only pick the closest alive Zamak Truck. I've tried loads of different methods, but I'm now quite stuck. Please help! This is my script so far, all working fine. [ this, "Load.", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_loaddevice_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {}, {}, { _this call { _ZamakTrans = nearestObjects [ _this select 0, [ "Truck_02_transport_base_F" ], 25 ]; if ( count _ZamakTrans > 0 ) then { target = ( _ZamakTrans select 0 ); _lockIndexes = [ 2, 3, 4, 5, 6, 7 ]; { if ( ( _x select 2 ) in _lockIndexes ) then { moveOut ( _x select 0 ) }; } forEach fullCrew target; { target lockCargo [ _x, true ]; } forEach _lockIndexes; box attachTo [ target, [ 0, 0.25, -0.15 ] ]; box setVectorDirAndUp [ [ 1, 0, 0], [0, 0, 1 ] ]; }; } }, {}, [], 2, Nil, true, false ] remoteExec [ "BIS_fnc_holdActionAdd", 0, this ]; What I need is to pick the closest alive Zamak Truck, not just the closest one. (any advice/criticism on my script will be greatly appreciated.)- 3 replies
-
- arma 3
- nearestobjects
-
(and 2 more)
Tagged with:
-
Trigger check for enemies in vehicles
Dj Rolnik posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey, I am in need of help with trigger conditions checking whether there are enemy units (OPFOR) present inside vehicles such as jets, helicopters or boats. The idea is to have the trigger check whether enemy aircraft (or boats, but that's really low priority and optional) is approaching a large location covered by a trigger (about 10+km in size) and when that happens, launch an alarm sound effect in a certain place on the map (possibly not the trigger itself, because they are supposed to be placed in different locations). The important thing is that it's not only OPFOR - present, as the activation type, but OPFOR units in aircraft-type vehicles. An extra nice-to-have feature (if even doable) would be to display a hint or any kind of message on the screen informing about the type of aircraft incoming (not necessarily the name of the specific type of aircraft, but rather its type, so in that case "helicopter" or "jet"). I would be grateful for help in defining this condition! Thanks! Adam -
Hello! Since the last week i'm struggling with terrible problem. I was playing ArmA 3 on my PC since the release day without any major probems, with many mods and without them. One day everything was alright, i was playing with my friends on modded server, felt sleepy and went to bed. I woke up the next morning and wanted to play on the same server, but after joining it and playing for something like 1 minute I was kicked - there was only "You were kicked off the game" text on the screen. I asked my friend to join the server and watch the chat when I get kicked. He noticed, that everytime I'm getting kicked, the chat says "Signature check failed" and a path to file from some mod. I decided to reinstall whole ArmA and mods, but the same happens. I've found more people with the same problem, I hope they will describe their situation below. ArmA was my favourite game, and now I keep getting kicked off every server with mods with the same error (only the file changes depending on which mods the server uses). I can't play the game, please help! PC specs: I7-6700k MSI z-170A Gaming Pro motherboard GTX 960 4GB MSI 2x HDD 1TB Seagate 8GB DDR4 RAM I didn't install any new software, drivers, etc.
-
inventory Check to see if a map is inside inventory
Play3r posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
what do i have to type in a triggers COND field if i want to check if a player picks up a map the "item_itemmap" from the game. i want to have the player finish a task when player picks up the map. thanks Play3r -
Hey guys, I would like to add for my players the ability to use an action which would only appear to them if they met a specific criteria. The criteria is to have a specific backpack and inside it, a specific item. I got the script responsible for the condition working, but only once I put it in the init.sqf. If I did it that way, the action would appear and remain available even after the condition was no longer fulfilled (the object being dropped for example). Naturally, I'd like to remove the action if the condition was no longer met. I basically do not know how to check for the condition so that it always pops up for the player once he meets that criteria. This is the script that I don't know how to call: if ((unitBackpack Player isKindof "tfw_ilbe_a_gr") && ("tfw_rf3080Item" in (items player + assignedItems player))) then {Player addAction ["Test Action", "test_action.sqf"];} Thanks!
-
Hi guys ! I'm currently searching for a solution, I'd like to check if there is a specific item in the vehicle inventory... I use the addon "Hero survive" and I'm currently creating a script that allow to repair brokens car if you have the specifics items. But some of them like wheels and battery are to heavy for backpacks so... I'd like to check if the tyres etc are in the car inventory. something like : _vehicle = _this select 0; _Wheels = {"herl_o_tyer" == _x} count ("InventoryOfCar" _vehicle); // Like (BackpackItems _player) if (_wheels == 4) then { blablabla car is repaired...} else { blablabla wheels missing.... }; I have all the "blablabla" thing, I just need to know how to check the car inventory, I already know how to check if player has specific item in his vest/backpack/uniform... but for vehicle.... :/ Thanks.
-
Hi everyone ! I'm stuck on something, i'd like to count items on a container. but I'd like to count _x for a group of item. I explaine myself : Every day (ingame) I check with a script if the box "Box" contain a certain amount of items, let's say that I check if there is some food in it. So I'd like to count if there is enough food (like 10 food item) in the box container, but it can be 2 carrots / 1 fish / 4 chickens etc... and I don't want to count like : _nbChicken = {"chicken" == _x} count (itemCargo MyBox); _nbFish = {"Fish" == _x} count (itemCargo MyBox); _nbFood = _nbChicken + _nbFish...... I'd like to make it this way : _table = ["Fish","chicken",etc....]; _nbFood = {_table == _x} count (itemCargo MyBox); is this possible ?
-
Check if all players have closed arsenal
alpha993 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I have a deathmatch mission which begins by opening the arsenal for all units and then teleporting them to starting positions as soon as they close the arsenal. So far I have this line of code: waitUntil {isnull (uinamespace getvariable "RSCDisplayArsenal")}; Unfortunately, this code fires whenever any player closes their arsenal, teleporting everybody else at the same time. What I would like is for the code to check until all players have closed their arsenals before continuing. Any suggestions? Best regards. -
Guys im creating a capture sector mission wich opfor has all the points captured and blufor needs to capture all 3 of then and i want the tickets only for respawning soo i only set 10 tickets for blufor and nothing for opfor, the problem is, when the blufor tickets goes to 0 it says Your Side Has Won instahead of: You Lose Faggot, soo what i tried to do to fix it? A trigger with the Condition: WestTickets <=0; On Act: endMission "LOSER"; Did it work? Of course not! Soo anyone can help me? Disclaimer Im not responsible for any english error cuz im brazilian :)
-
Check if unit has a machine gun or automatic rifle
beno_83au posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So, as title'd I need to determine if a unit has a machine gun/automatic rifle. At the moment I'm running with: _machineGuns = [ "MMG_02_base_F", "arifle_MX_SW_F", "LMG_Mk200_F", "LMG_Zafir_F", "MMG_01_base_F" ]; _gunCheck = {(primaryWeapon _unit) isKindOf [_x, configFile >> "CfgWeapons"]} count _machineGuns; if (_gunCheck != 0) then { //Code }; It works, but it would potentially require an edit to _machineGuns for any mod MGs, which detracts from it's user-friendliness. This is as basic as I was able to work out, so is there a better way? Please take note that I'm checking the weapon, not the unit. As an example, this is what I'm trying to achieve (script taken from VBS3): if ([configFile>>"CfgWeapons",(primaryWeapon _unit),"vbs2_mgun"] call fn_vbs_isKindOf) then { //Code }; So, in the example it's very convenient that "vbs2_mgun" covered everything, and thus requires no editing on the user's part. Cheers.