-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
How do you add black cinematic bars to players?
jshock replied to mrvinny1113's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe this, not sure, never messed with it myself: https://community.bistudio.com/wiki/BIS_fnc_cinemaBorder -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Add EH's for the mouse as well: https://community.bistudio.com/wiki/User_Interface_Event_Handlers -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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). -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 {...}; -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 :). -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
[SOLVED] Howto detect if object is vehicle or unit/man?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Which of these is the faster method?
jshock replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
EH would be a cleaner, and probably more efficient solution. -
How to detect is damage to unit is caused by burning ?
jshock replied to terox's topic in ARMA 3 - MISSION EDITING & SCRIPTING
There is an "isBurning" command that you may be able to work with. -
Simple singleplayer JIP like respawn script
jshock replied to Neviothr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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...]; .... -
Difficulties in setting difficulties post 1.58
jshock replied to fourjays's topic in ARMA 3 - SERVERS & ADMINISTRATION
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. -
Difficulties in setting difficulties post 1.58
jshock replied to fourjays's topic in ARMA 3 - SERVERS & ADMINISTRATION
Didn't work. -
Difficulties in setting difficulties post 1.58
jshock replied to fourjays's topic in ARMA 3 - SERVERS & ADMINISTRATION
Same. -
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.- 21 replies
-
- 3
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 :).- 21 replies
-
- 1
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.- 21 replies
-
- 1
-
- compile
- compileFinal
- (and 6 more)
-
setVelocity makes vehicle slide
jshock replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
setVelocity makes vehicle slide
jshock replied to Grumpy Old Man's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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.... -
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea thanks, on my phone, hard to defeat an oppenent such as an auto url tag that emplaces itself prior to a parenthesis...- 21 replies
-
- 1
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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- 21 replies
-
- 1
-
- compile
- compileFinal
- (and 6 more)
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
My link, part on "functions as files" or "file functions" or this:https://community.bistudio.com/wiki/Functions_Library_(Arma_3)- 21 replies
-
- 1
-
- compile
- compileFinal
- (and 6 more)