Jump to content

ColonelKernel

Member
  • Content Count

    74
  • Joined

  • Last visited

  • Medals

Everything posted by ColonelKernel

  1. ColonelKernel

    Make vehicles face a direction

    I want a helicopter to first rotate without moving, then after facing the right direction start moving towards a position.
  2. ColonelKernel

    Play radio commands

    Could it be this one? configfile >> "RadioProtocolENG" >> "SentCmdGetIn" I still don't know how to use it though.
  3. ColonelKernel

    Play radio commands

    Thank you for your answer. But how do I find the radio command I wanted? ("Get in that vehicle") I looked at the cfgRadio config but all of its messages were for MP (for example, one said "Be advised, we have a helo down" or something along that line)
  4. Hi. How can I find the handler ID to use with ctrlRemoveEventHandler ? https://community.bistudio.com/wiki/ctrlRemoveEventHandler
  5. ColonelKernel

    How to find handler ID

    Wait, that's the ID?! I thought the wiki meant an index (i.e a number) !
  6. Hi. I'm having issues activating scripts with command menus that have sub-menus. For instance, suppose I have created the following command menu: mount_subMenu = [ ["Mount",true], ["Car", [2], "#USER:car_subMenu", -5, [["expression", "hint ""Car"" "]], "1", "1"] ]; The hint command (or any other command for that matter) doesn't work right now. But if I remove #USER:car_subMenu from the code then the hint command works. I also tried doing this but the submenu disappears instantly (the hint command works however): mount_subMenu = [ ["Mount",true], ["Car", [2], "", -5, [["expression", " showCommandingMenu ""#USER:car_subMenu""; hint ""Car""; "]], "1", "1"] ]; Is there a way I can fix this?
  7. It also works without sleep! Awesome!
  8. By the way, what do you mean by it being an ugly hack?!
  9. Can I somehow keep it open?! (BTW sleep and waitUntil don't work)
  10. This is an example, so I don't actually want to do anything with it! I want to run the mount_subMenu first, and via that go to the car_subMenu and run the code prior to reaching that menu. (the actual menu I'm creating stores something in a variable, which is necessary for the submenu)
  11. Hi. How can I get the "in-game" name of objects? (for example instead of the long and weird name you get by "typeOf" for HEMTT you actually get "HEMTT") Edit: I just realized it's called "displayName" of a unit!
  12. ColonelKernel

    Get object and unit's in-game name

    Thanks bro! Thanks!
  13. ColonelKernel

    Get object and unit's in-game name

    I thought it was an easy and trivial question! LOL
  14. ColonelKernel

    Execute scripts when map is open

    What you say is true in most scenarios. But not all. Consider a case where the vehicle crew disembark their assigned vehicle. Then for your code to work you have to close the map and reopen it. Of course it's not that big an issue but I was looking to polish my code a little bit! (of course to the professional it may not be polished at all but for a noob like me that's as good as it gets!)
  15. Hi. How can I make a script run when the map is opened? I tried this but it doesn't work: While {visibleMap} do {
  16. ColonelKernel

    Execute scripts when map is open

    You're right. Some vehicles don't get revealed (like the humming bird).
  17. This also fixes the flickering! 0 = [] spawn { While {true} do { { waitUntil {visibleMap}; _allVehs = _x nearobjects ["allvehicles", 800]; _allEmptyVehs = _allVehs select {{alive _x} count crew _x == 0}; { if (player knowsabout _x != 1) then {player forgettarget _x}; player reveal [_x, 1]; } foreach _allEmptyVehs; } foreach units group player; sleep 2; waitUntil {shownMap}; }; };
  18. I'm trying to write a script for revealing all empty playerside vehicles to the player (MP & SP). This is how I've done it: 0 = [] spawn { while {true} do { _allEmptyVehs = vehicles select {{alive _x} count crew _x == 0 && (side==playerside)}; //vehicle should be empty (not counting the dead units) and on the player's side { player reveal _x; } foreach _allEmptyVehs; sleep 2; }; }; The problem is that the unit positions do not update on the map. Can someone please tell me what I'm doing wrong?
  19. ColonelKernel

    Execute scripts when map is open

    Since this is related to this thread, I'll post this again here: The red text does what the topic says.
  20. ColonelKernel

    Execute scripts when map is open

    Sorry I didn't know much about EventHandlers before. But now I see your point!
  21. ColonelKernel

    Execute scripts when map is open

    I appreciate the time you spent writing this. But like I said before, the purpose of the reveal command is for the vehicles to be known to my squad mates so that I can order them to get in without pointing at the vehicle or use the clunky Mount (key 4) menu. Thank you all the same.
  22. ColonelKernel

    Execute scripts when map is open

    This checks that the vehicle is alive (i.e not damaged) and empty, but I was aiming for it to be empty not counting the dead crew (or at least that's what I believe I have done!). I think the dead crew inside vehicles make them non-empty. (I recall somebody saying that in a post) Edit: Found it (it's for Arma 2 but I believe it's the same for Arma 3):
  23. Hi. How can I change a vehicle's variable when it's empty? (dynamically through the mission)
×