Jump to content

soldierXXXX

Member
  • Content Count

    73
  • Joined

  • Last visited

  • Medals

Everything posted by soldierXXXX

  1. soldierXXXX

    Arsenal: Exit before open

    Hi, no, unfortunaltely it's not possible. "arsenalPreOpen" is called right before the script creates arsenal display and cannot be interrupted. you have to wait until player opens arsenal and immediately close it. [missionNamespace, "arsenalOpened", { private _shouldClose = ["Arsenal"] call iV_fnc_checkCondition; if (_shouldClose) then { (uiNamespace getVariable ["RscDisplayArsenal", displayNull]) closeDisplay 2; }; }] call BIS_fnc_addScriptedEventHandler; I'm not sure how you create arsenal in your mission but if you create Arsenal with "AmmoboxInit" you can consider adding variable to condition that would allow you to restrict or allow arsenal during the mission. ArsenalAllowed = TRUE;//Boolean to enable or disable arsenal, define it before calling BIS_fnc_arsenal-needs to be publicVariabled in multiplayer with every change ["AmmoboxInit", [ammobox, true, { _this distance _target < 10 AND ArsenalAllowed}]] call BIS_fnc_arsenal; this way you can prevent opening arsenal and at the same time you will not close arsenal for players that have it already opened.
  2. Hi, _group1 setPlayable true; is 1) wrong syntax of the command - should be setPlayable unit and 2) is a broken command and in Arma 3 does nothing the thing you have to do for making this work is use forEach loop and use addSwitchableUnit command. {addSwitchableUnit _x} forEach units _group1; doHighCommand _group1; This command doesn't exist to add group to high command use command hcSetGroup GloriousLeader hcSetGroup [_group1]; Personally i haven't tried it but i hope i managed to point you to right direction 🙂 Everything about commands syntax can be read on Biki *Edit Actually addSwitchableUnit description states it's for singleplayer only (haven't noticed it before), so I'm not sure if it's possible to do this in multiplayer. You can always try 🙂 I don't see any other command that is able to do it otherwise.
  3. soldierXXXX

    Passing arguments from trigger

    Hi, you've passed the trigger as you should in this example however there is a problem with _guards variable which throws error should be: _guards = (units _faction) inAreaArray _trigger; Testing script with some adjustments you can consider here: Hope this helps 🙂
  4. soldierXXXX

    How to embed image in forum post

    Hi, so to correctly insert your image, you need to open the image on new card and open it only as image (open your link->right click on the picture->open image on new card->you should see only the image on the page->copy link from the browser bar->paste copied link into insert image from url box and it should work) Link should look like This example here when you post this link here: You don't even have to use insert url box, the forum automatically inserts the image when you provide link just by pasting into text field. If that won't work well i don't know what would 😄
  5. Hi. To remove current resource you can use this method. cutRsc ["Default", "PLAIN"]; More informations here If you wish to only delete progress bar but keep resource open, you can use command ctrlDelete
  6. Ok. Just to be sure, does your code looks like this or is it somehow different? _channel = radioChannelCreate [[0.73, 0.24, 0.11, 1], "Habib Channel", "%UNIT_NAME", [habib,alpha], true]; missionNamespace setvariable ["Habib_Channel",_channel]; habib customChat [_channel, "Hey American. Do you hear me ... shaitan radio ..."]; alpha customChat [_channel, "We can hear you Habib. Were are you?"]; habib customChat [_channel, "I am in Old City, next to the crane."]; alpha customChat [_channel, "OK, Habib, we will contact you soon."]; _channel = missionnamespace getvariable "Habib_Channel"; _channel radioChannelAdd [player]; Also i noticed you have invincible character in [player] array. That may be the reason why it throws the error.
  7. Try to use single word variable. "Habib_Channel" instead of "Habib Channel".
  8. soldierXXXX

    Chat GPT tried to script

    So i just finished the code you wanted. Triggers can work with CollectedItems variable. Variable is number that is tracking how many intel you handed over. To see how many items you handed over you can write: hint format ["Items i have handed over:%1",CollectedItems]; Condition in trigger might be something like this example if you have collected 13 and more items. CollectedItems > 12; The script is run from action that i demonstratively attached to player. I´ve added classic scroll menu action and hold action. Choose one you like more and delete the other one. Only change in the original code is that local variable _intelItems was changed to global variable intelItems. Why ? Because now you need to access information about array of items in more than one script (or scope to be precise). Global variables are just better for changing information on single place. I´ve also added notification, but delete it if you want. Put this whole code to init.sqf and it will work (or elsewhere if you want). This is solution for singleplayer. For multiplayer it must be done differently. You can change parameters to your liking. I´ve commented most of them. If you have questions, i´m happy to answer them. 🙂
  9. soldierXXXX

    Chat GPT tried to script

    Yeah that code won't work because, as I'm reading what AI wrote, there might be two situations. 1) player might have full inventory and thus can't add any item so it will just return 0. 2) player might be able to add item to inventory and the script will get stucked in while loop and since it's run in unscheduled environment it should stop around 10000 iterations and you don't want that. Pretty sure it would freeze arma if not whole PC 😄 If by any chance code worked it would have to repeat this process for x times depending on array length. However this is not what you desire. You want something much simpler and optimized. I will write the code for you when I'll return home. Basically the logic would be: Global variable of items given;//this will be good for triggers implementation Function: Count items that are relevant; Add this number to global variable; Remove all relevant items from player's inventory Currently I'm still at work, so I'll do it as soon as I'm available 😉
  10. soldierXXXX

    Chat GPT tried to script

    Lol no way. Did ChatGPT just stole my code? I've used it here in this topic. That just really made me laugh 🤣. When i'm back at home, i will see how can i help. I'm thinking about implementing "take" and "put" eventhandlers with some action that can do something similar like what you see in extraction. Or maybe someone will be quicker than me and solves your issue. 😉 Edit: Actually take and put eventhandlers might not be needed at all. Action that removes all required items from your inventory and adds numeric variable might do just fine. Do you need it for singleplayer or multiplayer?
  11. Command orderGetOut doesn't exist. Use doGetOut with combination of orderGetIn FALSE, allowGetIn FALSE or leaveVehicle. Also pay attention for commands syntax. Some commands needs units array instead of group.
  12. soldierXXXX

    De-ACEing a mission?

    There are two ways how to do that. First option is to open editor and merge mission. That should remove dependency and remove all items that are not present in the game. Save the mission. You need to copy all mission file content except mission.sqm if you have any in the folder (if you save the mission with the same name this might not be needed). Then you need to also set playable character again and weather attributes. Then save the mission. I did this to one of my published missions (same problem with ace dependency). Maybe also check units gear if they have first-aid kit automatically added. It's been while since i did this so I'm not sure if everything is gonna work as i wrote. Second option is to force load mission through eden editor. This option was added in update 2.06 but i haven't tried this method myself.
  13. Very interesting issue indeed. I´ve tested your mod, observed how AI works normally, with forceSpeed, without custom runways and here is my conclusion. So the biggest problem that is causing this issue are those custom runways you placed in editor. AI thinks that something that they can´t recognise is blocking the way which causes them to get stuck. Doesn´t happen everytime in the same spot but mostly somewhere on the runway (mostly first right turn in mod provided mission on airfield 0). when forceSpeed was used AI got unstucked and in many cases was able to take Off. Sometimes it still got stucked somewhere but not often. The range issue is the most interresting one because when i was just a normal unit on the ground it worked pretty good but as soon as i moved further from aircraft with unit or switched to splendid camera/spectator mode the plane got stucked until i moved the camera closer just like you did on the video. When i tested it without these runways the AI didn´t have a problem and moved as expected. The range issue with forceSpeed didn´t occurred anytime in this case. My previous solution works only for one plane at time. Plane is able to move like there are no obstacles in the way. Why does this work for only one plane ? It´s because object references. Disabling collision creates reference between two objects, but as soon as some other object refers to the same object, reference on that object gets overwritten and first object automaticaly enables collision again. See example 3 in disableCollisionWith. My code for this solution: Test for disabled collisions in debug console: Only solution for more planes i could have think of was to create pushing script so the AI cannot get stucked anywhere. AI is still able to turn around the runway so pushing the aircraft is working, but it´s not eye candy. However it works anywhere on the map and player doesn´t have to be around. Ideal solution would be to make these runways as part of the map but i think that´s not possible in this case. Another ideal solution would be allowing objects to be set as Simple objects. Here is my code for this solution: So in conclusion runways colliding with planes. Range issue with forceSpeed only appears when there are custom objects in the runway path that might normally block pilot AI movement. It´s a very specific case that causes this issue. Still, i´m not entirely sure if it should happen. Because it´s strange that when you´re around plane moves, but as soon as you move out of sight the plane stops. Maybe create a feedback ticket for that. I´m thinking about something universal like _unit disableAI "COLLISIONCHECK" or something like that might be pretty useful in such situations. But i´m not sure if it´s doable. I´m afraid i cannot help any further with this problem. At least i can confirm the issue does happen when AI is dealing with this situation 😄. I hope this helped 🙂. For anyone interested here is a debug code that will mark config positions on any map. I created it to test these airport ways.
  14. Alright so this seems like a collision issue. I´ve tested the case you described in your previous post. I´ve seen the plane brake when aproached object(s). Solution to this is simple. ForceSpeed is not needed. If the object can be set in Atributtes as Simple object, the plane stops braking. If the object cannot be set as Simple object (mission design or doesn´t have the option) you can solve it by disabling the collision with the plane. in the colliding object init field write: this disableCollisionWith myPlane1; and the object shouldn´t be a problem anymore. Tested case: Also (not sure if you know this or not) be aware that Planes cannot move upon the runway the way you might want them to. They can move only on predefined paths that is written in world config so they will ignore any move waypoint you gave them. For that case is best to record the path with unitCapture function. Example Altis airfield points: Green are for take off and Red are for Landing Also i´m still not sure about the 50m problem. That i can´t reproduce. Might you share a video about what´s happening in your mission and the code you use ?
  15. Can´t reproduce this either. I´ve tested it with multiple situations and the smoke was visible everytime. We need more informations. 1) Do you play with mods ? 2) What is your Video option settings 3) Which plane do you use ? 4) Do you have a repro code you can provide that issue occurred with ? 5) Rpt file you can provide ? 6) Anything you might tell us Here are some pictures so you can see this works normally on my end. *Edit Smoke example is to confirm command forceSpeed is working as expected (like: plane1 forceSpeed 2000;). Not sure if the issue is related to effect visibility or just the sound.
  16. soldierXXXX

    drawLaser between two objects

    Exactly what @Larrow said except i would change getPosASL for getPosASLVisual which gives you much smoother movement and visually precise position (getPosASL runs in simulation scope and getPosASLVisual runs in render scope) Example code: addMissionEventHandler ["Draw3D", { drawLaser [ getPosASLVisual object_1, getPosASLVisual object_1 vectorFromTo getPosASLVisual object_2, [0, 0, 1000], // Bright blue [], 0.5, 2, -1, false ]; }];
  17. soldierXXXX

    lbCurSel not working?

    Hi. Replace this part of code with this and it should work (not tested). Do you need explanation ? //index = lbCurSel _lista; //getLbText = _lista lbText index; life_fnc_boton = { _display = findDisplay 7726; _lista = _display displayCtrl 5245; _index = lbCurSel _lista; _getLbText = _lista lbText _index; if (_index == -1) exitWith { hint "No has seleccionado ninguna opción"; }; hint format ["%1 | %2", _getLbText, _index]; };
  18. Hi, yes it is possible to interrupt action for specific doors. If you find the building in config viewer, you can see that in "UserAction" every door action has priority number set to 11 (not sure about moded buildings). The engine automatically decreases every action with same priority number by -0.001. That means that door can be identified by it´s priority number -> door1 open = priority 11, close = priority 10.999, door2 open = priority 10.998, close = priority 10.997 and so on... I´ve made simple code that tells you the priority of door action you just performed so you can simply find the number you need. Sadly i can´t think about any other way to achieve what you desire. Default user actions like heal, open doors, get in vehicle and so on are not possible to remove so this is the only way how to interrupt it. Code for example that "locks" the main door: change position of wantedBuilding and if you want different doors to be locked, change _priority == number according to doors you interacting with. wantedBuilding = nearestBuilding [6005.66,10592.8,0]; inGameUISetEventHandler ["Action", "params ['_target', '', '', '', '', '_priority', '', '', '', '', ''];_forbidAction = FALSE;_condition = (_target == wantedBuilding AND {_priority == 11});hint format ['Building Locked:%1\nAction priority:%2\nAction is interrupted:%3',_target == wantedBuilding,_priority,_condition];if _condition then {_forbidAction = TRUE};_forbidAction"];
  19. soldierXXXX

    arma 3 sound insulation in vehicle

    Everything is explained HERE. It just plays the sound as speech when TRUE is set. That means it doesn´t apply sound filters but reacts to fadeSpeech instead of fadeSound. In case you replaced TRUE with 2 instead it would also not apply sound filters this time the sound would react to fadeSound. Basicaly that´s the only difference between these two parameters. So in short- testvehicle1 say3D ["vtolRamp", 100, 1, TRUE];//this reacts to fadeSpeech testvehicle1 say3D ["vtolRamp", 100, 1, 2];//this reacts to fadeSound
  20. soldierXXXX

    arma 3 sound insulation in vehicle

    Hello. Try to set isSpeech parameter to TRUE (or 2 if you need fadeSound applied instead of fadeSpeech) when executing the command. I just quickly tried that and it helped. What is interesting is that some vehicles can play sounds normally as you expect the command should behave (i tested with "C_Offroad_02_unarmed_F" which plays sounds correct and with "B_LSV_01_unarmed_F" which does not) but most vehicles does play sound exactly as the car in the video. This is my best bet, so try it and let us know 🙂. testvehicle1 say3D ["vtolRamp", 100, 1, TRUE];
  21. Okey. I´ve enhanced the script for all the possible usage 😄. It was a bit of work but now the script can do these things: Script now can be repeated if needed. Drones will now attack targets only if the target is not claimed by other drone. Drones wait until all drones that claimed target are destroyed or if they meanwhile find different target. Drones now have optional parameter that will decide their usage-If they should reposition to new area or if they should stay at their current location. (when script is repeated) I´ve added also example how to spawn drones at multiple locations heading for the same target area. The script now doesn´t need anything prepared in the mission (i´ve removed the marker depandency) The script is now also more optimized and should be separated into Init.sqf and 1234.sqf (memory operations optimization) I´ve also added syntax comments so you know how you can use the scripts and what they need. Init.sqf 1234.sqf Try it out and let me know if that meets your expectations 😄
  22. Thanks 🙂 I´m glad it´s working. In case you don´t need to repeat the radio action, i think we can consider this topic as closed 🙂.
  23. Alright i´ve put together a quick script which should be able to make what you described. You don´t need anything else than marker called "eastDroneMarker". Script should operate with any drone on the map. If you want to be able to repeat the trigger it would need some adjusting for example to exclude already operating drones. I´ve added also the possibility to spawn new drones if you´d wanted to use it. Put this whole script to your 1234.sqf file and it should be able to run. Ideally separate it into Init.sqf and since "you can edit from here" to 1234.sqf but it´s not needed in case you don´t wanna. You shouldn´t use the original code in combination with this.
  24. Based on the provided script, these drones have their own specific behaviour writen in init field. They are not fully functional until the westDroneTrigger is activated. Then the script creates random waypoints inside marker named "westDroneMarker" and then drone seeks the enemy until it finds one. Maybe one drone knew about the target while other didn´t. Then the script deletes created waypoints and proceeds to target until it reaches 30 meters from the target. I´m not sure what _temp does. Probably some descent or something. After that the drone falls off which activates the bomb in killed EH. _this has nothing to do with it. The script i provided just moves the drones to position you click on the map nothing else, because in your original question you asked: Next If i understand it right, naming would not help you in this case unless you want to control the drones different way (manually write code for each drone). Never try to combine two different scripts if you don´t know what you´re doing (practice first on easier scripts and try to learn what does what). If you did this, it would only create syntax errors because this and later _this in init fields of the drones refers to the drone itself while _allUAVs refers to array of all possible drones and it´s part of the other script. That means _allUAVs variable is not visible to other scripts.
  25. I have a better solution for you. This will work if you have units already spawned. _allUAVs = allUnitsUAV; _allUAVs = _allUAVs select {side _x == west AND canMove _x}; _allUAVs onMapSingleClick "{_x move _pos} forEach _this; target_zone = true; onMapSingleClick ''; true";
×