Jump to content

XallZall-39dbbb756b7e13ec

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About XallZall-39dbbb756b7e13ec

  • Rank
    Private
  1. I am not able to get the newer one to work but its fine for now since the first code you provided is working as I had intended it. Thanks again for everything, and I will try to get the newer version to work as well, whenever that may be I will post here again. Take care and many thanks again, you been a really big help 💪
  2. I gave the new code a go, a new error: Error Undefined variable in expression: _pylons Located at the lower section of the code: {_veh setPylonLoadout _x} forEach |#|_pylons; }forEach (vehicles select {_... Not sure why this is happening since _pylons have been declared. Triple checked everything as well before I wrote this to make sure I made no mistakes.
  3. Thanks @pierremgi Okay so I gave it a go and I encountered a few issues. I tried even rewriting the whole code as well just to rule out any copy-paste issues or spaces or anything else. When I try your code that you written I am getting a error saying Error Undefined variable in expression: _veh I assumed that is is because in this code we do not have private _veh = _x; being declared. If I add that to the code, just under private "_pylons"; like this: private _veh = _x; private "_pylons"; I am getting an error saying: Error Undefined variable in expression: _x Here is the current code with some minor changes. ResetTimer = 5; player addAction ["Equip (Bomb) Pylons", { for "_i" from ResetTimer to 1 step -1 do { hint format ["Changing Pylons... %1", ResetTimer]; ResetTimer = ResetTimer -1; sleep 1; }; private "_pylons"; private _veh = _x; { call { if (_veh isKindOf "RHS_Mi24V") exitWith { _pylons = [ [1, "rhs_mag_b8v20a_s8kom",TRUE], [2, "rhs_mag_b8v20a_s8kom",TRUE], [3, "rhs_mag_b8v20a_s8df",TRUE], [4, "rhs_mag_b8v20a_s8df",TRUE], [5, "rhs_mag_9M120M_Mi24_2x",TRUE], [6, "rhs_mag_9M120M_Mi24_2x",TRUE], [7, "rhs_ASO2_CMFlare_Chaff_Magazine_x4",TRUE] ]; }; {_veh setPylonLoadout _x} forEach _pylons; }; }forEach (vehicles select {_x isKindOf "helicopter" && _x inArea Hanger_01}); hint "Pylon reconfiguration completed."; ResetTimer = 5; }]; Change log: Rewriting of the entire code to rule out any copy paste or space or indentation issues as well as "invisible characters" Changed "this" to "player" in addAction (just to make troubleshooting more easy) Removed the second if (_veh isKindOf...) to simplify the code for troubleshooting Added private _veh = _x; just under private "_pylons"; HeloHanger_01 has been renamed to Hanger_01 Fixed a typo in hint "Changing Plyons... to Pylons renamed resetTimer to ResetTimer with a capital R at the bottom of the code // typo. I had the double variables before just so that everything could be modified from the top since the code here wont have a 5 second pylon change time and will have different trigger zones, so that was just to make changes easy. But I have kept them removed in the new code here as well just for the sake of simplification. I also assumed before that we do not need the isKindOf "helicopter" anymore since we are looking for isKindOf "AH64D" so its interesting to see you put that back in.
  4. @pierremgi I really hate to ask but, can you show me how to do this with the previous code that includes the trigger? I was contemplating whether to or not to even post this because I am fairly embarrassed of my inability to take advantage of your better tuning example that you posted. ResetTimer = 5; TiggerName = HeloHanger_01; ChangeTime = ResetTimer; this addAction ["Equip (Bomb) Pylons", { for "_i" from changeTime to 1 step -1 do { hint format ["Changing Plyons... ETA: %1" , ChangeTime]; changeTime = changeTime -1; sleep 1; }; private "_pylons"; call { if (_veh isKindOf "RHS_Mi24V") exitWith { _pylons = [ [1, "rhs_mag_b8v20a_s8kom",TRUE], [2, "rhs_mag_b8v20a_s8kom",TRUE], [3, "rhs_mag_b8v20a_s8df",TRUE], [4, "rhs_mag_b8v20a_s8df",TRUE], [5, "rhs_mag_9M120M_Mi24_2x",TRUE], [6, "rhs_mag_9M120M_Mi24_2x",TRUE], [7, "rhs_ASO2_CMFlare_Chaff_Magazine_x4",TRUE] ]; }; if (_veh isKindOf "RHS_AH64D") exitWith { _pylons = [ [1, "rhs_mag_b8v20a_s8kom",TRUE], [2, "rhs_mag_b8v20a_s8kom",TRUE], [3, "rhs_mag_b8v20a_s8df",TRUE], [4, "rhs_mag_b8v20a_s8df",TRUE], [5, "rhs_mag_9M120M_Mi24_2x",TRUE], [6, "rhs_mag_9M120M_Mi24_2x",TRUE], [7, "rhs_ASO2_CMFlare_Chaff_Magazine_x4",TRUE] ]; }; }; {_veh setPylonLoadout _x} forEach _pylons; forEach (vehicles select _x inArea TiggerName); hint "Pylon reconfiguration completed."; ChangeTime = ResetTimer; }]; This is fairly embarrassing for me to post as no doubt it will highlight my limited understanding of coding/scripting. I noticed that the {_veh setPylonLoadout _x} is below this time around, not sure if I understood correctly because I am not sure if it is meant to be here. I am also not sure if I got the part with the _inArea TriggerName correct either.
  5. @pierremgi you are my hero. This is working perfectly exactly how I imaged it. All I had to do was give the Trigger the name and set ChangeTime back to 5 in this case to reset the timer. What was giving me the most issue is not knowing how to tell the trigger to get the object that is inside of it... So I will break down my understanding, please feel free to correct me if I am mistaken at any point... private _veh = _x; (I looked into the private command here but honestly I dont really get it just yet, but you set it to be _x) forEach (vehicles select {_x isKindOf "helicopter" && _x inArea yourTriggerName}); (Here I believe you are using forEach to check everything in the trigger, that is a vehicle with the vehicle command, then the isKindOf "helicopter" to check if its a helo or a subclass of it, using inArea to declare to look into the Trigger of yourTriggerName) And also thank you for the advice on the possible issues that may arise with this code since its using 7 pylons. I just tested this as well, and while it works, I can see it being abused as I managed to arm a little bird with 4 s8Kom Rockets, carrying 80 rockets this way. So your suggestion of making separate classes, perhaps something like light medium heavy helicopters and then filtering them out that way.
  6. Hello BI community, I am as green as it gets with these forums, with that said I did search for relevant topics, without success so apologies in advance if I overseen a similar topic in advance, but honestly I don't even know how to query best what I am searching for. I will describe what I am hoping to achieve: I have an object, it can be anything, but in this case its a Crate. I also have a Trigger and a helicopter. The concept is as follows: The Helicopter is parked on and in the trigger. Any player can go to the box and use an addAction menu to select a Pylon Loadout for said helicopter. The addAction menu then activates the trigger to execute a code to first wipe any existing pylons and then give them the new pylons. The problem: I managed to get pretty much everything to work, expect that I don't know how to apply the code without giving the Helicopter a Variable Name or using "vehicle player". I would like to trigger to simply apply the commands to the helicopter without me specifying a Variable name, as I wish to make this trigger universal to every helicopter that lands on it, and dynamically, so if new helicopters happens to be created/purchased, that they can also use and take advantage of the feature. The code (Without a Trigger and Wipe in this case) ChangeTime = 5; this addAction ["Plyon (X)", { Delayer =[] spawn { hint format ["Changing Plyons... ETA: %1" , ChangeTime]; sleep ChangeTime; vehicle player setPylonLoadout [1, "rhs_mag_b8v20a_s8kom"]; vehicle player setPylonLoadout [2, "rhs_mag_b8v20a_s8kom"]; vehicle player setPylonLoadout [3, "rhs_mag_b8v20a_s8df"]; vehicle player setPylonLoadout [4, "rhs_mag_b8v20a_s8df"]; vehicle player setPylonLoadout [5, "rhs_mag_9M120M_Mi24_2x"]; vehicle player setPylonLoadout [6, "rhs_mag_9M120M_Mi24_2x"]; vehicle player setPylonLoadout [7, "rhs_ASO2_CMFlare_Chaff_Magazine_x4"]; hint "Plyon reconfiguration completed."; }, }]; This code will work but only if its activated and then the player goes into the helicopter, and while I am not certain, I believe it would probably also change the pylons for other helicopters that happen to be piloted by a human. Stuff that I tried: I tried using this, thislist and various other means inside the trigger but of course those target the trigger itself or create an array and setPylonLoadout needs a Object not an array. Question and TL/DR: Is there a way to apply the pylons within the trigger without given the helicopters any Variable Names? Thanks in advance and apologies if this was already answered somewhere before.
  7. XallZall-39dbbb756b7e13ec

    Buldozer freezes when having too many objects

    Alright I managed to fix this problem, I posted this on steam and will also repost it here in case it may be of help to anyone else: Terrain Editor - Buldozer fails to work if there are many objects Detailed bug report: Buldozer works fine and has no issues when there is none or a low amount of objects in the Terrain Editor. Buldozer freezes when there is allot of objects in the Terrain Editor (In my case above 14000 objects.) If the objects layer is set to hidden, Buldozer will work. Running Buldozer in streamed mode will work but not show all the objects. (Tools -> Buldozer (Streamed)) Possible solutions and fixes: 1. Try removing the roads.shp found in data/roads 2. Have the roads not go into any water. (Strange bug that can cause buldozer to freeze at higher object count.) 3. In the P:\scripts folder open editor.sqs and set ~0.1 to a higher value, for example try: ~1.0 What fixed it for me is solution 3. Credit to Richie who posted here: Hope this is of help and continued good luck with your map!
  8. XallZall-39dbbb756b7e13ec

    Bulldozer problem - some objects are not displayed

    Removed my post, posted accidentally in wrong thread.
×