-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
Scripts Vs Mods: what's better?
jshock replied to zagor64bz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
An upside to an addon (that some people benefit from) with just scripts no true modifications, is that mission develpers wouldn't have to go back and update all their missions just to include your script or update it for each new release. Sure there is the hassle of downloading a small addon, but most of the time, if it's just scripts, the mission isn't overly dependent on the addon because for most addons like that the effect is clientside. It also reduces overall mission file size, allowing for faster loading times when joining a server. -
Need help with simple add action script
jshock replied to jabeds's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Actually, just noticed you said the driver of the vehicle change: "vehicle player isKindOf 'Car'"To: "driver (vehicle player) == player"And with say3D it's not possible to stop the sound AFAIK, same goes for the other sounds commands I believe. -
Need help with simple add action script
jshock replied to jabeds's topic in ARMA 3 - MISSION EDITING & SCRIPTING
player addAction [ "Play Sound", { vehicle player say3D "MySoundFromDesc"; }, nil, 99, false, true, "", "vehicle player isKindOf 'Car'" ]; Put the above in the initPlayerLocal.sqf -
CuratorObjectRegistered eventhandler help
jshock replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea, that was my bad, answered a little too late at night :). -
CuratorObjectRegistered eventhandler help
jshock replied to Fiddi's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Make an initPlayerLocal.sqf and try this (if anything you can just remove the curator check and just add the EH to all players, shouldn't make a difference): if (player in allCurators) then { player addEventhandler ["CuratorObjectRegistered", { _this select 0 addCuratorEditableObjects [allUnits,true]; _this select 0 addCuratorEditableObjects [vehicles,true]; }]; }; -
How to activate AI upon trigger activation?
jshock replied to kraxous's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/setFriend https://community.bistudio.com/wiki/disableAI Both viable options, set them in the editor, change them with the trigger. -
Multiplayer EventHandler GetIn for respawnable vehicles using the Respawn module
jshock replied to ozdeadmeat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For the textures use setObjectTextureGlobal. What do you mean that the getIn EH's aren't executing on the client, as in the code in those functions aren't running properly, or something else, because the effects of getIn are local to the vehicle the EH is applied to: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#GetIn -
3rd Person Passenger Restriction
jshock replied to driftingnitro's topic in ARMA 3 - MISSION EDITING & SCRIPTING
For a mouse (with up to mouse button 5 at least): (findDisplay 46) displayAddEventHandler [ "MouseButtonDown", { _mouseDIK = [65536,65665,65538,65539,65540]; if (_mouseDIK select (_this select 1) in actionKeys "User2") then { systemChat format ["%1 -- mouse used",(_this select 1)]; }; } ]; -
[CLOSED] Sarogahtyps Spawn Script Creator (SSSC)
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, I completely blanked on doing this and just now remembered :P, here they are implementation should be simple enough (I hope), there are probably a few things overlooked because when I made this script I was really only looking at a single unit not an actual group of units, but I'm sure changes for handling that are simple enough as well. Further expansion, as I stated earlier, should be easy enough with the current layout (I do recommend not reordering the four waypoint properties that I've already got covered. There may also be a need to clean up any empty groups as to not reach the group cap, but again, I leave that for your experimentation :). /* ////////////////////////////////////////////// Function Author: J.Shock Function: addWaypoints Parameters: Waypoint information compiled from saveWaypoints function Return: Array- [new group of unit,number of waypoints added back] Example Call: [this,this getVariable "JSHK_savedWaypointArray"] call JSHK_fnc_addWaypoints; */////////////////////////////////////////////// JSHK_fnc_addWaypoints = { params ["_WPinfo"]; private ["_count","_unit","_newGrp"]; _unit = (_WPinfo select 0); _newGrp = createGroup (side _unit); _count = count _WPinfo; for "_i" from 1 to (_count - 1) step 1 do { _tempWP = _newGrp addWaypoint [((_WPinfo select _i) select (_i - 1)),0]; _tempWP setWaypointBehaviour ((_WPinfo select _i) select (_i - 1)); _tempWP setWaypointSpeed ((_WPinfo select _i) select (_i - 1)); _tempWP setWaypointType ((_WPinfo select _i) select (_i - 1)); }; [_unit] joinSilent _newGrp; [_newGrp,count waypoints _newGrp]; }; /* ////////////////////////////////////////////// Function Author: J.Shock Function: saveWaypoints Parameters: Array- [[the unit,all waypoints of the unit],current waypoint of group] Return: Array- [the unit,waypoint,waypoint,waypoint....] Example Call: [[this,waypoints this], currentWaypoint this] JSHK_fnc_saveWaypoints; */////////////////////////////////////////////// JSHK_fnc_saveWaypoints = { params ["_WPs","_current"]; private ["_WParr"]; _WPs params ["_unit","_waypoints"]; _WParr = [_unit]; { _tempArr = []; _tempArr pushBack (waypointPosition _x); _tempArr pushBack (waypointBehaviour _x); _tempArr pushBack (waypointSpeed _x); _tempArr pushBack (waypointType _x); _WParr pushBack _tempArr; false } count _waypoints; _WParr;//could easily add a setVariable on the unit here, to easily access in addWaypoints as well }; Obviously the order in which you save them, you must add them back in that order, hopefully self-explanatory, let me know of any questions.- 20 replies
-
- 1
-
- Spawn Script Creator
- WIP
-
(and 4 more)
Tagged with:
-
Here's an outline of what you just described, I'll leave it to you to fill in the blanks: params ["","_caller",""]; if (side _caller == WEST) then { if (isNil "s_1010") then { //create vehicle } else { ["Vehicle already exists",3] spawn _fnc_timedHint; }; } else { ["You aren't BLUFOR!",3] spawn _fnc_timedHint; };
-
If you don't want a hint there, which in that case, you honestly don't need to use the function at all.....
-
Well, the timed hint does nothing, because you need to pass in parameters to it: ["My hint text",3] spawn _fnc_timedHint;//waits 3 seconds before clearing the hint
-
Check whether player JIPed into an existing AI unit
jshock replied to Freghar's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/Event_Scripts initPlayerLocal.sqf params ["_playerObject","_didJIP"]; if (_playerObject in playableUnits && _didJIP) then { //stuff }; Or, for respawns you could also use the onPlayerRespawn.sqf. -
Action Menu keep adding (noob script)
jshock replied to palatine's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
You didn't answer either of my questions, I understand the problem. -
Is there anyway to add a dog companion to a player in the current build of ArmA 3?
jshock replied to rekkless's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In a mission, no, with a mod/addon, sure it's possible to an extent (as I'm not sure how far current animal models would take you). EDIT: Blanked on dog models already in the game (it's going to be a long day....). And Organ has a perfect answer for you below :). -
Action Menu keep adding (noob script)
jshock replied to palatine's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Is this whole squad AI or players? and is there respawn or no? -
Problem with globality of KeyPressed
jshock replied to Goro's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
You can just use variable 'player' in the scope of a keyDown EH: keyDown = (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 37) then {player execVM 'ON1.sqf'}"]; And you really only need one waitUntil loop, and the other issue that may be causing your other player to turn the light on/off is that any player coming in would get 4 key down eventhandlers (for each key bind), so you may want to have a name/guid check, i.e.: if (name player == "John Smith") then { //add keybinds }; if (name player == "Jane Doe") then { //add keybinds };- 1 reply
-
- 1
-
[CLOSED] Sarogahtyps Spawn Script Creator (SSSC)
jshock replied to sarogahtyp's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I would say both methods would balance out (mostly), either way not spawned or hidden with all background proccesses ceased, the performance would be relatively similar I would think. As far as waypoints go, I have a couple functions that may be of interest to you (save/add waypoints), I would post them, but it's extremely late, and they need a little sprucing up for the public eye :). Let me know if they interest you and I'll try and post them tomorrow. The current setup that I have for them just saves all the basic waypoint info, but there is a lot of possible info that could be saved and re-added for waypoints, and my functions are self-explainitory enough to be able to insert any additions you so desire.- 20 replies
-
- 1
-
- Spawn Script Creator
- WIP
-
(and 4 more)
Tagged with:
-
I apologize for assuming you understood "alternative", but it's clear you don't have patience for such things, hopefully a dev (or similarly skilled community memeber) will post with a clear calculative solution to apease you in your situation. Forwarding you to a working solution gets you plenty far, just not in your intended direction.
-
I'm talking about: https://dev.withsix.com/projects/cca/wiki/Keybinding
-
I understand exactly what your're going for, cause I wanted the same thing, and found the same weird return, but I'm just saying that CBA does have the functionailty to interpret key bindings in any combination, that is if you didn't want to take the time to figure this out (cause I still haven't). I understand your're looking for the calculation that obtains the return of shift+key or whatever other combo, but like you I have no idea what that could be, I'm just providing alternatives.
-
Would be interesting to see for sure, an easy way, with the downside of an addon dependcy is use CBAs keyBind function, it handles everything.
-
See if this thread helps: https://forums.bistudio.com/topic/184861-checking-multi-key-return-value-keydown-displayeh/#entry2914868