Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. Maybe this, not sure, never messed with it myself: https://community.bistudio.com/wiki/BIS_fnc_cinemaBorder
  2. Yea, I edited after I saw that, but then there is this thread: https://forums.bistudio.com/topic/160653-middle-mouse-button-ui-event/ Which shows that mouseButtonDown can be used on a display.
  3. SOME_CTRL ctrlAddEventHandler [ "MouseButtonDown", { if (_this select 1 in actionKeys "personView") then { if (((vehicle player) == player) || (player in assignedCargo vehicle player)) then { player switchCamera "INTERNAL"; true; } else {false}; }; } ]; I see what your're saying, but I'm not sure what control is used for the mouse/whatever, hopefully someone else can enlighten :P. Why do you have a separate case for ships?
  4. Take a look at this thread (pinned at the top of this forum): https://forums.bistudio.com/topic/158256-stacked-event-handlers-oneachframe-onplayerconnected-etc/ I don't believe the EHs we are using are stackable.
  5. Add EH's for the mouse as well: https://community.bistudio.com/wiki/User_Interface_Event_Handlers
  6. Yea looks good, but I think all you need to check is: vehicle player == player, and then the assigned cargo. if (vehicle player == player) then {stuff; true;}; if (in assignedCargo) then {stuff;true;};Again, psuedo.
  7. FYI, "player displayAddEH" is psuedo, on my phone and was too lazy to type it all out, replace with: (findDisplay 46) displayAddEventHandler [...]; Also, you need to return true in that EH to overwrite the key bind to make sure they can't go 3rd person. (check my edit if you haven't in the post above).
  8. Ok, I'll put it this way, waitUntil basically runs on each frame, so suppose you run Arma @30FPS, therefore your condition runs 30 times a second, so unless you can somehow press 30 keys within one second, my condition is checked less, making my concept theoretically more efficient. EDIT: https://community.bistudio.com/wiki/assignedCargo if (player in assignedCargo vehicle player) then {...};
  9. It would only run if a particular key is pressed, EHs run inherently (afaik), so there isn't much of a performance issue, and if you use a lot of scripts/mods, they all probably use some version of a key pressed EH, that all run on specific instances. So overall, no, this isn't an issue when it comes to optimization. Someone can correct me if I'm wrong :).
  10. Maybe try this (concept, unsure of validity). Put a keyDown EH on the players checking actionKeys for this action: personView player displayAddEH [ "KeyDown", { if (_this select 1 in actionKeys "personView") then {hint "No 3rd"; true;}; } ];CTRL+F for "view", https://community.bistudio.com/wiki/inputAction/actions/bindings
  11. Yep, pretty much the same. object isKindOf "Man" object isKindOf "Car" etc.. You should be able to look in the cfgViewer as well to get class hierarchy.
  12. EH would be a cleaner, and probably more efficient solution.
  13. There is an "isBurning" command that you may be able to work with.
  14. If you use the "createUnit array" it returns the created unit so you don't have to use a global variable: https://community.bistudio.com/wiki/createUnit_array _newUnit = group player createUnit [typeOf player,getMarkerPos "respawn",[],0,"NONE"];I also used "typeOf player" to generalize your code a bit more that way people don't have to hard code the classname of the player entity, simply just see what it is (that way it works easily with mods that may not readily make available classnames).It may also be safer to pass in the killed entity into the script as well, in case "player" doesn't exist for whatever reason when the JIP script executes: ... addEH ["Killed", {[(_this select 0)] execVM "JIP.sqf";}]; //JIP.sqf params ["_oldUnit"]; _newUnit = group _oldUnit createUnit [typeOf _oldUnit...]; ....
  15. 3rd person is the only option I need to work, the rest I just need to turn off, but as you said it just defaults to whatever (in my case the new Verteran, which doesn't allow 3rd person, which I want allowed). I've copied and pasted the code provided on that page (altering just the custom values) with no joy.
  16. Not to be a complete ass, but honestly most decent mission makers can probably figure out what to do with it given a proper example as many scripters have given for their code (look at all my code pages), it's not complete rocket science, and if a mission maker truely wants the feature you provide I'm sure they will take the time to find out how to implement it.
  17. Easier than you may think, you basically just add a config.cpp file (essentially similar to the description.ext) declare your functions there (in addition to CfgPatches) and then all the other necessary function files, use A3 Tools to pack it, done :).
  18. The point of the library is to have, one function, one file, in theory, sure you could put more than one function per file and precompile/postInit them, but it takes away from the intent of the library (at least in my opionion). For server side stuff, you could either make a server side addon, or just make sure at the top of your server functions to have a check, if the accessing machine isn't the server, exit the function.
  19. jshock

    setVelocity makes vehicle slide

    On my phone atm, but you could look into this page (ctrl+f for friction) and see if you can grab any config info from the vehicle and calculate a compensation: https://community.bistudio.com/wiki/Config_Properties_Megalist
  20. jshock

    setVelocity makes vehicle slide

    I've had that sort of/exact issue with my cruise control script for the longest time now.....too busy/lazy/stupid to fix the issue, but it worked prior to the new physics coming in (a long time ago), so I'm sure there are a few more calculations needed to get it working properly....
  21. Yea thanks, on my phone, hard to defeat an oppenent such as an auto url tag that emplaces itself prior to a parenthesis...
  22. Well then....https://community.bistudio.com/wiki/Functions_Library_(Arma_3) EDIT the stupid auto url tags are getting screwy with the ')' so here: https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Finding_a_Function
  23. My link, part on "functions as files" or "file functions" or this:https://community.bistudio.com/wiki/Functions_Library_(Arma_3)
×