Jump to content

_qor

Member
  • Content Count

    294
  • Joined

  • Last visited

  • Medals

Community Reputation

11 Good

About _qor

  • Rank
    Staff Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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).
  2. Great, it works. Now I am finally aware of what forEach does ;)
  3. 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?
  4. 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.
  5. 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?
  6. 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!
  7. Ah, thought _weaponsCargo would also contain information about magazines. Works great, thanks a lot for those scripts!
  8. 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.
  9. 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.
  10. 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";
  11. 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.
  12. 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!
  13. 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
  14. 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 "///"!
  15. 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?
×