-
Content Count
294 -
Joined
-
Last visited
-
Medals
Community Reputation
11 GoodAbout _qor
-
Rank
Staff Sergeant
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Check player is not seen by enemy
_qor posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey there, I want to wide the friend/enemy conditions a bit. So even if the player is regarded as enemy to a side, it can be setCaptive true. The conditions for this are fullfilled if the player has no weapon or is inside unarmored car. This is the loop: And the question is how to control if the loop stops or continues. So if the player has been identified as enemy, the loop has to stop so it wont set the player to captive true again. Unfortunately I realized too late that knowsAbout is not suitable for this, because its result doesnt decrease properly. Actually I wanted to stop the loop if west knowsAbout player >= 0.105 and to continue it if < 0.105. So is there better way to check if the player is not seen/detected by side west? I would combine that with a specific period of time this condition must be true (timeout). -
Add numeric values of an array to one sum
_qor replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Great, it works. Now I am finally aware of what forEach does ;) -
Add numeric values of an array to one sum
_qor posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey, I want to know how much weapons and magazines are within a spefic cargo. getWeaponCargo and getMagazineCargo return the following array: [["AK_74","M4A1"],[4,30]] So (getWeaponCargo _vehicle) select 1 would return all the amounts of the weapons. But how can I easily add them to one sum? -
helling3r's removeWeaponCargo script only removes one item?
_qor replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
The content of the box will change very often while playing. So I cant use a code which adds a fix amount of weapons/magazines. It simply will not achieve the same effect as when I would remove a single weapon. -
Hey, I was very lucky when I found helling3r's script which handles reading and refilling of cargo space: https://dev.withsix.com/issues/68594 But it is not possible for me to remove multiple items at once: _removeW = [_box, "AK_74", 5] call CBA_fnc_removeWeaponCargoGlobal; Additionally, the simple syntax only removes ALL items: _removeW = [_box, "AK_74"] call CBA_fnc_removeWeaponCargoGlobal; Is there anything I could have done wrong with this? Apparently there are 3 files to download, of course I use the latest one... Does this work for you?
-
Hey, I am looking for a way to transfer weapons from ammoboxes to vehicles without picking each single weapon. Best way would be to have an interface which allows you to choose the weapons and which adds/removes the selection when finished. But this requieres some experience with creating interfaces. Perhaps there already exists a script or there is an easier way to do this? Otherwise I really have to get into creating interfaces. In this case it would be great if the dialog of the already existing gear menu can be seen. Thanks!
-
Swap weapons from vehicleCargo
_qor replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ah, thought _weaponsCargo would also contain information about magazines. Works great, thanks a lot for those scripts! -
Swap weapons from vehicleCargo
_qor replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Wow, excellent!!! Exactly what I was looking for! So you call BIS_fnc_removeIndex to remove the each existing weapon from the vehicle? Or does this just removes the preexisting weapons in the ammunition MTVRs? Script works great for weapons, but not for magazines. I dont really know how to adapt the script. {_vehicle addMagazineCargoGlobal _x} forEach _weaponsCargo; returns onlythe given weapons. -
Hey, I added some weapons and magazines to a vehicle's cargo. Is there a way to swap this weapon-setup, which may have changed, to an ammobox? Cant find a way to do this by getWeaponCargo and weapons only returns "TruckHorn". I think there is a way to do this with getWeaponCargo, otherwise this code would have been introduced only to make the cargo visible. Unfortunately pickWeaponPool and putWeaponPool doesnt work. I read some posts mentioning that those codes do work.
-
How to activate trigger if unit is surrendering?
_qor replied to dabrowskipl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try with this, I didnt look up the syntax rightly as well ;) _suspect = _this select 0; _police = _this select 1; _action = _this select 2; _suspect disableAI "MOVE"; _suspect removeAction _action; hint "SUSPECT IN CUSTODY"; -
How to activate trigger if unit is surrendering?
_qor replied to dabrowskipl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry, there was a redundant quotation mark. handcuffAction = this addAction ["HANDCUFF","handcuffScript.sqf","",1,true,true,"","((_target distance _this) < 4)"] You can always look this up on your own at: https://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2 Search for addAction and look up the syntax and the examples. -
addAction with respawning vehicles
_qor posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey, the scenario first: a convoy which has to get stolen by the player which has to unload the convoy's content at base. Convoy gets respawned if dead and therefore two vehicles with actually the same name can exist. Problem is, that when a vehicle with the same name as an existing vehicle gets spawned, the first vehicle (the "old" one) gets a new name. So there is a trigger which fires when a convoy vehicle is inside. But it wont get fired by the old vehicle which has been renamed. Actually I solved this problem (it just worked good without knowing exactly why), but while "improving" the script it seems to be a problem again. So this how I set up the addAction: FC2veh setVehicleInit "unloadFC2 = this addAction ['UNLOAD','convoys\Unload\FCunload.sqf','',1,true,true,'','((_target distance _this) <6) && (FC2veh getVariable ''GOODS'' == 1) && [FS_anar,_this] call bis_fnc_inTrigger']"; processInitCommands; What I thought is, the local variables would alway return the correct vehicle. But when the new vehicle is spawned, the action disappears from the old vehicle and only appears back when the new one is inside trigger too. Does this mean that [FS_anar,_this] call bis_fnc_inTrigger always returns FC2veh? Pls help, I got lost in script-glyphs ._. EDIT Got the point! Ofcourse the problem came up with introducing the a getVariable which is connected to the name. Anyway, it would be great if there is a convenient way to work around this problem with respawn and unitnames! -
Evaluate enemy with a specific vehicle as Target
_qor replied to _qor's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ya I solved it with "Incoming Missile" EVH. I guess there is no way to detect unguided missiles which hasnt been targeted at the helicopter without rather complicated scripting. Its hard to hit a flying chopper with a non guided rocket anway ;D -
How to activate trigger if unit is surrendering?
_qor replied to dabrowskipl's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
To your last problem: Add this to your suspect's init: handcuffAction = this addAction ['HANDCUFF','handcuffScript.sqf','',1,true,true,'','((_target distance _this) < _range)'] Where you have to replace _range with the distance you want to be able to catch the suspect (try with 4). Create in your mission folder: handcuffScript.sqf _suspect = _this select 0; _police = _this select 1; _action = _this select 2; _suspect disableAI "MOVE"; ///_suspect setCaptive true; _suspect removeAction _action; hint "SUSPECT IN CUSTODY"; As far as you chase civilian units, you wont need to set them to captive because they are neutral to anyone anyway. If this is the case, just delete this line in the script, otherwise delete "///"! -
Hey, I want to evaluate the fuel-level of a fuel station and add some fuel. Using an trigger to evaluate will return "scalar", but putting the same code in an gamelogic's init, it will return 1. fuel ((position this) nearestObject 94046) So why does this work only with a gamelogic? How can I evaluate this with an external script? Besides, does anybody know whether the fuel stations have eternal resources or get empty when in use?