Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. For future reference, put your scripting/mission creation requests here: https://forums.bistudio.com/forum/200-arma-3-find-or-offer-editing/
  2. jshock

    Spawn Ai Help

    Yea I would recommend running this on the server only.
  3. jshock

    Spawn Ai Help

    Mark1 needs to be in quotations: getMarkerPos "Mark1"And as stated above, the rpt file should catch stuff like that and/or turn on showScriptErrors too see them in realtime.
  4. jshock

    SHK_Fastrope

    Only benefit in the scope of moving a script such as yours to an addon basically means that the mission makers don't have to go back to all their projects and add this script or update it in each mission file in the future.
  5. I don't know the scope of use with this, but I do recommend a more unique variable name aside from "owner", as it's generic and could cause issues on a larger scale, especially if you use lots of other scripts/addons/mods. (It's a good coding convention too :p)
  6. jshock

    Spawn car with script

    And unless you need to reference each vehicle globally after creation there is no need to name it, just use the local variable "_veh" as your reference to the vehicle. _veh = createVehicle ["B_G_Offroad_01_F", getMarkerPos "markerName"]; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; _veh addWeaponCargoGlobal "hgun_Rook40_F";
  7. As always with your many threads, there is no context behind what you want, what type of action do you want completed from the action...? Sooner or later people will stop responding.
  8. Look up the classnames of the medic for the mods you use.
  9. My thoughts as well, with the condition of the action being: "_this distance _target < 3"
  10. jshock

    wind speed

    Not sure about the actual question here, however, within the function, on format, shouldn't you be using _Speed, as opposed to _windSpeed?
  11. jshock

    Spawn car with script

    Only change I would make to it, as with most of my old projects and such, I couldn't have the suspension, or it needed to move onto the next piece of code after the hint without waiting for the hint to complete, so I would spawn it in: _fnc_timedHint = { params ["_hint","_time"]; hint _hint; sleep _time; hint ""; }; ["Spawning a vehicle ...",2] spawn _fnc_timedHint; "B_G_Offroad_01_F" createVehicle position player; ["Vehicle spawned near you",2] spawn _fnc_timedHint;
  12. jshock

    Please help.

    All the popular advanced medical systems are all player based, no AI involvement, so seeing how I can at least mostly understand what he is after now, I don't believe there is a single system that covers all those requirements, or at least none that are still supported. What all scripts/mods are you currently using, so maybe we can help offer suggestions as to some other additions that may help in your endeavor.
  13. jshock

    Spawn car with script

    Correct, but for some, like myself at times, I don't like to have a hint on my screen for an extended period of time, so I do clear the screen as exampled above.
  14. jshock

    Please help.

    If I could understand the requirements, I just may be able to answer that question.
  15. Hmm, I see your issue, and it's not that it's not sitting, its that it is sitting then standing up right after, I had success with this: https://community.bistudio.com/wiki/BIS_fnc_ambientAnim [this,"SIT_LOW","ASIS"] call BIS_fnc_ambientAnim; And it is getting late here, and I can't debug the issue as to why the action/playMove/switchMove commands are being unsuccessful, as I tried: doStop and disableAI "MOVE" to no avail. I'm sure it's something simple, as always, but at the moment, no lights are turning on :p.
  16. For sitting down at least, you could also use: this action ["SitDown",this]; And you can do the same for all other actions listed here.
  17. When wanting to suspend for a time, just use the sleep command by itself, you don't need a waitUntil around it.
  18. Hello Arma Scripting Community, Boredom sets in again, so I bring to you a loading effect function that works MP and JIP (or it should :p). It gives the classic "Loading.", "Loading..", "Loading...", type effect until a variable is altered at which point, "Loading Complete!", or at least that's it in a nutshell. Basically it runs off of a missionNamespace variable and the spawn of the function, so at any point you set the missionNamespace variable to false, the load effect will cease, and go to the "completion" hint. Usage: So, for obvious reasons, you need to have the variable set to true before spawning this function (unless you want the completion text immediately), that can be accomplished like this: missionNamespace setVariable ["JSHK_use_LoadHint",true]; You then spawn the function like so: [[],"JSHK_fnc_Loading",true,false,false] call BIS_fnc_MP; Then once the completion of whatever code/script/function that you wanted to show a loading effect for is done, just set the variable to false: missionNamespace setVariable ["JSHK_use_LoadHint",false]; You can go in and alter the hints and their contents in the function variables: _one, _two, _three, and _final (_final being the "completion" text). For more information on how to do structured text please visit this BIKI page. Please post any comments, suggestions, or questions below! Without further avail, here is the code: /* ////////////////////////////////////////////// Author: J.Shock Function: JSHK_fnc_Loading Description: A "loading" effect. Parameters: Usage based on the missionNamespace variable "JSHK_use_LoadHint". Return: None. **DISCLAIMER** Do not remove the header from this file. Any reproduced portions of this code must include credits to the author (J.Shock). Example usage: //some script in need of a loading feature //before the call to the function missionNamespace setVariable ["JSHK_use_LoadHint",true]; //call function [[],"JSHK_fnc_Loading",true,false,false] call BIS_fnc_MP; //after all necessary elements are completed (i.e. an objective completely created) missionNamespace setVariable ["JSHK_use_LoadHint",false]; */////////////////////////////////////////////// JSHK_fnc_Loading = { private ["_one", "_two", "_three", "_iter", "_final"]; _one = composeText [parseText "<t color='#ffffff' size='1' align='center' >Objective is being Created.</t>"]; _two = composeText [parseText "<t color='#ffffff' size='1' align='center' >Objective is being Created..</t>"]; _three = composeText [parseText "<t color='#ffffff' size='1' align='center' >Objective is being Created...</t>"]; _final = composeText [parseText "<t color='#6cdd23' size='1' align='center' >Objective Creation Done!</t>"]; _iter = 0; if !(missionNamespace getVariable ["JSHK_use_LoadHint",false]) exitWith { hintSilent _final; sleep 5; hintSilent ""; }; while {missionNamespace getVariable ["JSHK_use_LoadHint",false]} do { switch (_iter) do { case 0: { hintSilent _one; }; case 1: { hintSilent _two; }; case 2: { hintSilent _three; }; default { systemChat "Failed hint >> JSHK_fnc_Loading"; }; }; if !(missionNamespace getVariable ["JSHK_use_LoadHint",false]) exitWith {}; if (_iter >= 2) then {_iter = 0;} else {_iter = _iter + 1;}; sleep 1; }; hintSilent _final; sleep 5; hintSilent ""; };
  19. Hello Arma Community, I present to you: Shock's Building Garrison Function (SBGF) Short Description: 1. Garrison Function (Spawned Units): This function allows a mission developer to garrison buildings in a town/city/village with a user defined percentage based on the overall building count. The function returns an array of all units spawned in >> [unit,unit,unit] For the center position you can use a marker, object, or a position array. When using the percentage parameter, the value must be between 0-1 (i.e. (0.2)). Parameters: 1- Center position: (string/object/position array) (default: objNull) 2- Side of units: (side) (default: EAST) 3- Radius for building search: (scalar) (default: 200) 4- Percentage of used building positions: (scalar (0-1)) (default: 0.2) 5- Types of units to spawn: (array of classnames) (default: ["O_Soldier_F","O_Soldier_AR_F"]) 6- (Optional)Define the limit of spawned units: (scalar) (default: -1) **This overrides parameter 4 (percent of used building positions) unless (-1) is used** 2. Garrison Function (Editor Placed Units): This function allows a mission developer to garrison groups of editor-placed units with a simple function call in the group leaders' init field. For the center position you can use a marker, object, or a position array. Parameters: 1- Unit/Group Leader: (object) (note: for use with unit's name or init field using "this" as the parameter) 2- Center position: (string/object/position array) (default: objNull)3- Radius for building search: (scalar) (default: 200) Usage: Place the SBGF folder in your mission directory. In your description.ext: class CfgFunctions { #include "SBGF\cfgfunctions.hpp" }; Example call line (trigger, script, etc.): //For function spawned units _units = ["mrkName",EAST,300,0.3,["O_Soldier_F","O_Soldier_AR_F"],-1] call SBGF_fnc_garrison; //For editor placed units (in group leader's init field) 0 = [this,"mrkName",200] call SBGF_fnc_groupGarrison; Download: Changelog: v1.2 >>Optimizations and error fixes v1.1 >>Added second function to garrison editor-placed units (SBGF_fnc_groupGarrison). v1.0 >>Initial Release
  20. this addAction [format["<t color='#FF3B3E'>%1</t>",_variable],"file.sqf"];
  21. wonno addAction [format ["%1",_motorhealth],{}]; Or wonno addAction [str(_motorhealth),{}];
  22. What is "_sidepos"? I just tested in Stratis at Camp Rogain and copied your call line, changed "_sidepos" to "player" and no error.
  23. jshock

    Concurrent scripting.

    This thread is from A2/OA, but still relevant: https://forums.bistudio.com/topic/115016-call-execvm-and-spawn-which-and-when/ Other links that may or may not be helpful/related, but will still have useful information anyways :p: https://community.bistudio.com/wiki/Code_Optimisation http://killzonekid.com/arma-scripting-tutorials-sqf-sqs-and-script-scheduler/
  24. Your're more than welcome to take over at anytime :p.
×