-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
Detecting when engine is on to run a script.
jshock replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Engine Truck1 addEventHandler [ "Engine", { if (_this select 1) then { null = [(_this select 0)] execVM "Detonation5.sqf"; }; } ]; -
Which can be done here: feedback.arma3.com
-
Help with timing of script execution
jshock replied to thecoolsideofthepillow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Moving the call to this script to the initPlayerLocal.sqf should fix the issue, if not then at the top of the init/initPlayerLocal put: waitUntil {!isNull player && time > 3}; -
Replace a class
jshock replied to Miroslaw Kowalski's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
These two links may help, may not: https://community.bistudio.com/wiki/ArmA_3_Replacement_Config_Tutorial https://community.bistudio.com/wiki/Arma_3_Characters_And_Gear_Encoding_Guide -
Help with timing of script execution
jshock replied to thecoolsideofthepillow's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, when exactly do you want to delete the "things", I can assume since you tried it in the init, that you want to delete them at mission start? -
After your createVehicle line: https://community.bistudio.com/wiki/createVehicleCrew
-
Easy Hostage Script (E.H.S)
jshock replied to djotacon's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Change the following lines within the sqf: //42 _sec = _hostage addaction ["<t color=""#0000FF"">" + ("Secure prisioner") + "</t>","hostage.sqf",nil,6,true,true,"","_this distance _target < 3"]; //60 _hostage addaction ["<t color=""#0000FF"">" + ("Follow squad") + "</t>","hostage.sqf",nil,6,true,true,"","_this distance _target < 3"]; //76 _hostage addaction ["<t color=""#0000FF"">" + ("Free hostage") + "</t>","hostage.sqf",nil,6,true,true,"","_this distance _target < 3"]; -
https://en.wikipedia.org/wiki/Kinematics Unless you mean: "cinematics"
-
Here is some simply straightforward code as to what I'm thinking, but maybe I'm just not understanding completely what you mean: fnc_getMissionVariables = { _vars = []; _profileVars = ["checkpoint","rallypoint","assualt","lastStand"]; { _vars pushBack (profileNamespace getVariable [_x,false]); } forEach _profileVars; _vars; }; if (profileNamespace getVariable [firstMissionHasBeenPlayed,false]) then { _vars = [] call fnc_getMissionVariables; [_vars] call fnc_startMission; } else { [] call fnc_startNewMission; };
-
What happens to the local variables of a terminated script?
jshock replied to Ed!'s topic in ARMA 3 - MISSION EDITING & SCRIPTING
Script terminates, variables terminate, memory is reopened (last I remember anyways). -
You could save certain "flag" type variables to the profileNamespace of the player, and just check to see if certain flags are true/false before overwriting any data.
-
How do I force pop up target to automatically stand back up when shot ?
jshock replied to CoolSpy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_Target animate ["terc", 0]; -
Random tasks\objectives
jshock replied to greywolf907's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea it's probably the BIS function, you will need to find another community script that allows for waypoint/patrol generation in water. -
Random tasks\objectives
jshock replied to greywolf907's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try this: _rndPos = [_AOmarker,50,_radius,5,2,0.5,0,[],[]] call BIS_fnc_findSafePos; -
IF/While stopping the script
jshock replied to jcae2798's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks appreciate the complement. -
IF/While stopping the script
jshock replied to jcae2798's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No one has to listen to me, but I'm surely honored that you think that my words have the power to will people into doing something :D. -
Random tasks\objectives
jshock replied to greywolf907's topic in ARMA 3 - MISSION EDITING & SCRIPTING
True. True. True. And also very true. :D As far as I'm concerned there is considerably enough information in this thread for you to figure it out, sorry if that makes me an ass, but eh :p. -
IF/While stopping the script
jshock replied to jcae2798's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, bad choice of a word, so what, I've just never like using them. Hey Das, yea I know what their used for, and could be used for, but I've just never had a situation in which I needed to use them, or at least I preferred a different method when I could have used them :p. -
IF/While stopping the script
jshock replied to jcae2798's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's what I would consider an unclean way of doing things, I've honestly never seen anyone use that in any of the code that I've ever seen for Arma 3. -
IF/While stopping the script
jshock replied to jcae2798's topic in ARMA 3 - MISSION EDITING & SCRIPTING
exitWith is used in conjunction with an if statement, not while. Your exitWith statement has to be within the overall while loop, to then exit the while loop: while {condition} do { if (condition) exitWith {hint "loop ended";}; }; //rest of code... -
Mission Editor Dedicated Server Simulation
jshock replied to Kingsley1997's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Not really worth the time and effort of BI, MP mission scripting/editing isn't exactly leaps and bounds different from SP, you just have to grasp a couple concepts (i.e. locality) to be able to accomplish what you want. -
I don't know about the official BI missions, but I've always used the standard in-game editor, with some patience and persistence, and was able to accurately enough place objects.
-
if !(_randomcar in _EXCLUDE) then {};
-
Shock's Building Garrison Function (SBGF)
jshock replied to jshock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It could be that the buildings don't follow BI's building position system, in which case, this script won't work. And to be honest I neither have the time nor interest to see about an alternate way of combating that issue, you are more than welcome to explore options for it (i.e. a community building position(s) function). -
Trouble figuring out a script error
jshock replied to conz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
if (!isServer) exitWith {}; _HC = owner HC; //"HC" denotes the name of the unit in-game ["HCS_addToHC", "onEachFrame", { if ((isPlayer)||(_x in units group _HC)) exitWith {}; if (isNull _HC) ExitWith{}; { _x setGroupOwner _HC; //adding all units that aren't player or aren't already under HC to HC }forEach allUnits; }] call BIS_fnc_addStackedEventHandler;