Jump to content

sabot10.5mm

Member
  • Content Count

    124
  • Joined

  • Last visited

  • Medals

Everything posted by sabot10.5mm

  1. sabot10.5mm

    array question

    I'm not very good at writing code so could you help me out by showing me how do it
  2. sabot10.5mm

    array question

    unfortunately it did not work. no errors shown
  3. sabot10.5mm

    Enemy occupation system (eos)

    this script spawns ai if the player nears a certain marker. how would one edit it, so that UAVs and the player activate the script? this would allow me to set a uav plane to loiter the marker spawning ai - which would allow me to fly cas without the risk of ai despawning.
  4. i have a script to regen the players health in a mission shown below, once the player dies and respawns using a script. the regen health script stops working, i have an idea how to make it work but pretty new to coding. something along the lines of having a (waituntil) player dead command then start the loop over? is this the right track? private ["_newDamage","_t"]; while {alive player} do { _t = time; waitUntil {time - _t > 1}; if (damage player > 0) then { _newDamage = (damage player) - 0.2; player setdamage _newDamage; //hintSilent format["Current Damage %1",_newdamage]; }; sleep 0.50; };
  5. sabot10.5mm

    How to Teleport script??

    _dest = (_this select 3) select 0; player setPosATL [getPosATL _dest select 0, getPosATL _dest select 1, getPosATL _dest select 2]; works just fine i just didnt do it right. typos... thanks anyway
  6. sabot10.5mm

    waituntil command?

    thats a very nice script, but a little problem i see is - it takes 24 hours to heal fully? i really want the script to work only for blufor and to take around 10 seconds to heal from 0.99 to 0. dont get me wrong thanks for this script.
  7. sabot10.5mm

    How to Teleport script??

    how i can teleport to the top of a tower. i tried but i cant get it to work. //this addAction ["Teleport -destinationName","teleport.sqf",[objectName]]; // Get the destination. _dest = (_this select 3) select 0; // Get a random direction _dir = random 359; // Move the person a few meters away from the destination (in the direction of _dir) player SetPos [(getPos _dest select 0)-3*sin(_dir),(getPos _dest select 1)-3*cos(_dir)]; player setPosATL [getPosATL _dest select 0, getPosATL _dest select 1, getPosATL _dest select 2]; <------------------------------------------------------------------------------- i can teleport to ground lvl but i want to get the "above terrain lvl" of the object and teleport to the top of a tower. edit. nevermind the setposatl works perfectly.. here is my example. its a firing range with an endless supply of ai being heli dropped in once they lose 70% of its force. i use the teleport script to teleport the player to different parts of the range to get better vantage points http://steamcommunity.com/sharedfiles/filedetails/?id=267375554
  8. sabot10.5mm

    waituntil command?

    waituntil wont work since the script stops until its met {blah}. so i just terminate the regen script on player death and exe on player spawn
  9. sabot10.5mm

    waituntil command?

    /* A script for SP Respawn. By Twirly - 6th July 2011 */ private ["_plyr","_kilr","_type","_group","_dist","_camera","_found","_rand","_unit"]; _plyr = _this select 0; _kilr = _this select 1; _mrkr = if (count _this >2) then {_this select 2}; if (isNil "_kilr") then {_kilr = objNull}; //grab some stuff we need later _type = typeOf _plyr; _group = group _plyr; _dist = _plyr distance _kilr; if (count _this > 2) then { //if (not (isNil _mrkr)) then { //create the new unit.... same group _unit = _group createUnit [_type, (getMarkerPos _mrkr), [], 1, "COLONEL"]; sleep 2; addSwitchableUnit _unit; selectPlayer _unit; _unit setUnitRank "COLONEL"; waitUntil {_unit == player}; _found = true; _oldUnit = _this select 1; _oldGroup = group _oldUnit; //We dont care if he was not the leader if (leader _oldGroup == _oldUnit) then { h = [_oldUnit, _oldGroup] spawn { _oldUnit = _this select 0; _oldGroup = _this select 1; _oldProviders = _oldUnit getVariable ["BIS_SUPP_allProviderModules",[]]; _HQ = _oldUnit getVariable ["BIS_SUPP_HQ",nil]; //Wait for a new leader to be assigned waitUntil { leader _oldGroup != _oldUnit }; _leader = leader _oldGroup; if ((count _oldProviders) > 0) then { { _providerModule = _x; { if (typeOf _x == "SupportRequester" && _oldUnit in (synchronizedObjects _x)) then { [_leader, _x, _providerModule] call BIS_fnc_addSupportLink; }; }forEach synchronizedObjects _providerModule; }forEach _oldProviders; }; { _used = _oldUnit getVariable [format ["BIS_SUPP_used_%1",_x], 0]; _leader setVariable [format ["BIS_SUPP_used_%1", _x], _used, true] } forEach [ "Artillery", "CAS_Heli", "CAS_Bombing", "UAV", "Drop", "Transport" ]; _leader setVariable ["BIS_SUPP_transmitting", false]; _leader kbAddTopic ["BIS_SUPP_protocol", "A3\Modules_F\supports\kb\protocol.bikb", "A3\Modules_F\supports\kb\protocol.fsm", {call compile preprocessFileLineNumbers "A3\Modules_F\supports\kb\protocol.sqf"}]; if (!(isNil "_HQ")) then { _leader setVariable ["BIS_SUPP_HQ", _HQ]; }; }; }; execVM "light.sqf"; } else { //try to find a random playable unit while {(not (_found)) and ((count switchableunits) >=1)} do { _unit = switchableunits select (floor (random (count switchableunits))); if (alive _unit) then { _found = true; selectplayer _unit; }; sleep 1; }; }; private ["_newDamage","_t"]; while {alive player} do { _t = time; waitUntil {time - _t > 1}; if (damage player > 0) then { _newDamage = (damage player) - 0.2; player setdamage _newDamage; //hintSilent format["Current Damage %1",_newdamage]; }; sleep 0.50; };
  10. i created a single player mission with respawning vehicles and a respawn for the player, but once the player dies he cant enter vehicles anymore... i figured since the Lock option is set to default maybe this is causing the problem? anyway to set the lock status on respawn for a spawned vehicle?
  11. sabot10.5mm

    Support module

    this is the code i am using to respawn the player. supports sometimes isnt synced to the player on respawn /* A script for SP Respawn. By Twirly - 6th July 2011 */ private ["_plyr","_kilr","_type","_group","_dist","_camera","_found","_rand","_unit"]; _plyr = _this select 0; _kilr = _this select 1; _mrkr = if (count _this >2) then {_this select 2}; if (isNil "_kilr") then {_kilr = objNull}; //grab some stuff we need later _type = typeOf _plyr; _group = group _plyr; _dist = _plyr distance _kilr; if (count _this > 2) then { //if (not (isNil _mrkr)) then { //create the new unit.... same group _unit = _group createUnit [_type, (getMarkerPos _mrkr), [], 1, "COLONEL"]; sleep 2; addSwitchableUnit _unit; selectPlayer _unit; _unit setUnitRank "COLONEL"; waitUntil {_unit == player}; _found = true; _oldUnit = _this select 1; _oldGroup = group _oldUnit; //We dont care if he was not the leader if (leader _oldGroup == _oldUnit) then { h = [_oldUnit, _oldGroup] spawn { _oldUnit = _this select 0; _oldGroup = _this select 1; _oldProviders = _oldUnit getVariable ["BIS_SUPP_allProviderModules",[]]; _HQ = _oldUnit getVariable ["BIS_SUPP_HQ",nil]; //Wait for a new leader to be assigned waitUntil { leader _oldGroup != _oldUnit }; _leader = leader _oldGroup; if ((count _oldProviders) > 0) then { { _providerModule = _x; { if (typeOf _x == "SupportRequester" && _oldUnit in (synchronizedObjects _x)) then { [_leader, _x, _providerModule] call BIS_fnc_addSupportLink; }; }forEach synchronizedObjects _providerModule; }forEach _oldProviders; }; { _used = _oldUnit getVariable [format ["BIS_SUPP_used_%1",_x], 0]; _leader setVariable [format ["BIS_SUPP_used_%1", _x], _used, true] } forEach [ "Artillery", "CAS_Heli", "CAS_Bombing", "UAV", "Drop", "Transport" ]; _leader setVariable ["BIS_SUPP_transmitting", false]; _leader kbAddTopic ["BIS_SUPP_protocol", "A3\Modules_F\supports\kb\protocol.bikb", "A3\Modules_F\supports\kb\protocol.fsm", {call compile preprocessFileLineNumbers "A3\Modules_F\supports\kb\protocol.sqf"}]; if (!(isNil "_HQ")) then { _leader setVariable ["BIS_SUPP_HQ", _HQ]; }; }; }; } else { //try to find a random playable unit while {(not (_found)) and ((count switchableunits) >=1)} do { _unit = switchableunits select (floor (random (count switchableunits))); if (alive _unit) then { _found = true; selectplayer _unit; }; sleep 1; }; };
  12. i created a single player mission with player respawn, synced with a few support modules. i have a problem with syncing the modules back to the player, it just wont work. even manualy syncing using THIS wont work.. player addAction ["sync arty", { [player, req, arty] call bis_fnc_addsupportlink; }]; player addAction ["sync drop", { [player, req, supply] call bis_fnc_addsupportlink; }]; there is a carvate to this. it works after killing the ai then killing the player i suspect the ai leader is taking control of support
  13. sabot10.5mm

    vehicle respawn module.

    help me understand.. why doesnt a command like this work. _this allowdamage false; in the expression field
  14. sabot10.5mm

    vehicle respawn module.

    i dont mind that.. thanks for your help;)
  15. sabot10.5mm

    vehicle respawn module.

    im fairly new to scripting, where should i put this? in the vehicle respawn module? specifically the expression field?
  16. sabot10.5mm

    Player respawn in singleplayer

    anyway to respawn playable AI? a script maybe
  17. how do i get this to work in arma 3 SP? i put the SP_respawn in my mission folder. _null = ["SPR_start",this] execVM "SP_respawn.sqf"; into the player int field and nothing happens no error no nothing
  18. sabot10.5mm

    AI Spawn Script Pack

    The code below is a loop for reinforcing Thanks a bunch! spunFIN for the scripts
  19. sabot10.5mm

    AI Spawn Script Pack

    im making a range mission that needs a ability to reinforce an area once the enemy loses 70% of its force using the reinforcementchopper... can anybody help me.
×