Jump to content

TurokGMT

Member
  • Content Count

    222
  • Joined

  • Last visited

  • Medals

Everything posted by TurokGMT

  1. TurokGMT

    Airfield Support Package

    Yeah, spotted the markers - thanks for the heads up on those. Menus now working as intended, but grid references appear to be off for fallujah. x coords are reporting correctly, but y coords are out quite significantly too far north. Needless to say this was a pain in the arse during an extraction -.- EDIT - yeah, confirmed the y coord error. Need to add 500m to the y coords for your dialogues because (0,0) is not bottom left corner of the fallujah map.
  2. TurokGMT

    Airfield Support Package

    Excellent set of scripts, top notch work. Having trouble using them in the fallujah map though. Initially tried a mission merge, but none of the units appeared on the map. Resorted to copy/pasting everything and checking the names etc. all copied across correctly. When previewing the mission, the dialogues pop up fine and the squad menu works as intended, however none of the support options work. I get their dialogue come up, but don't get the radio chatter about tasks. None of the base AI want to get on with their intended jobs =[ Any ideas?
  3. TurokGMT

    Mobile HQ Script

    Use the getpos or getmarkerpos command first to get the coordinates of either the mhq or the marker, then use setpos with one of them offset by a few metres. Don't recall sytax perfectly, but something like: _pos = getmarkerpos "marker name here"; _newpos = [(_pos select 0) - 10, _pos select 1, _pos select 2]; player setpos _newpos or something similar. Hope it helps.
  4. Hey guys, I've been pulling my hair out trying to get this script to work. Mission tested both through editor and local dedicated server (ie running a dedi server, but connecting to it from the same machine, different instance of arma 2) Problem, as you can see, I've riddled this script with debug sidechats, trying to find out the issue. ALL of the sidechats before the while loop are producing results, but NONE of the sidechats INSIDE the while loop are firing - can anyone see something wrong with my loop setup? // script to allow pilot of MV22 to deploy firebase when landed with engine off // script is fired by a GETIN event handler for the pilot only // passed parameters of vehicle and driver // requires a marker named firebase to be placed in editor _debug = true; if (_debug) then { player sidechat "DeployFOB.sqf has started successfully"; }; _MV22 = _this select 0; _pilot = _this select 1; if (_debug) then { _string = format ["Vehicle passed : %1 \n Pilot passed : %2 \n value of firebase : %3",_mv22,_pilot,firebase]; player sidechat _string; player sidechat "beginning main loop"; _string = format ["mv22 alive chack : %1",(alive _MV22)]; player sidechat _string; }; while {(alive _MV22)} do { if (!(local _MV22) || _pilot != (driver _MV22) || !(isplayer (driver _MV22))) then { exitWith {player sidechat "something fucked up"}; }; if (_debug) then { player sidechat "valid call of deployFOB script"; }; if (speed _MV22 == 0 && !(isEngineOn _MV22) && (firebase == false)) then { _deploy = _MV22 addAction ["Deploy Firebase", "FOB\firebase.sqf"]; if (_debug) then { player sidechat "Adding deploy firebase action"; }; }; if (speed _MV22 == 0 && (firebase == true) && (_MV22 distance (getmarkerpos "firebase") < 20) then { _packup = _MV22 addAction ["Pack up Firebase", "FOB\packupfirebase.sqf"]; if (_debug) then { player sidechat "firebase deployed, adding packup option"; }; }; if (speed _MV22 != 0 || isEngineOn _MV22) then { _MV22 removeAction _deploy; _MV22 removeAction _packup; if (_debug) then { player sidechat "you're moving! removing actions"; }; }; if (_pilot != driver _MV22) exitWith { _MV22 removeAction _deploy; _MV22 removeAction _packup; if (_debug) then { player sidechat "driver got out or got shot - removing actions"; }; }; sleep 1; }; if (true) exitWith {};
  5. Bug confirmed for me too. Flashlight can only be toggles on or off if aimed at the sky. Seems to only allow toggle if the torchlight is not illuminating anything eg a building? EDIT - confirmed it's FPS related, not directionsal =[ time to shell out on a new pc again...*sob*
  6. Well, that begs the question WHERE DO WE GET 5.04 FROM!!! Release it now, we beg you Monsada!
  7. Ok, looks the script is finally behaving as I want it to. Had to add a few more removeaction lines to ensure all situations were covered eg starting engines then getting out etc. Final version looks like this: // script to allow pilot of MV22 to deploy firebase when landed with engine off // script is fired by a GETIN event handler for the pilot only // passed parameters of vehicle and driver // requires a marker named firebase to be placed in editor private ["_deploy","_packup","_a"]; _debug = true; _a = 0; if (_debug) then { player sidechat "DeployFOB.sqf has started successfully"; }; _MV22 = _this select 0; _pilot = _this select 1; if (_debug) then { _string = format ["Vehicle passed : %1 \n Pilot passed : %2 \n value of firebase : %3",_mv22,_pilot,firebase]; player sidechat _string; player sidechat "beginning main loop"; _string = format ["mv22 alive chack : %1",(alive _MV22)]; player sidechat _string; }; while {(alive _MV22)} do { if (!(local _MV22) || _pilot != (driver _MV22) || !(isplayer (driver _MV22))) exitWith { player sidechat "something fucked up"; _MV22 removeAction _deploy; _MV22 removeAction _packup; _a = 0; }; if (speed _MV22 == 0 && !(isEngineOn _MV22) && !(firebase) && (_a != 1) ) then { _MV22 removeaction _packup; _deploy = _MV22 addAction ["Deploy Firebase", "FOB\firebase.sqf"]; if (_debug) then { player sidechat "Adding deploy firebase action"; }; _a = 1; }; if ( (speed _MV22 == 0) && (firebase) && (_MV22 distance (getmarkerpos "firebase") < 20) && (_a != 2) ) then { _MV22 removeaction _deploy; _packup = _MV22 addAction ["Pack up Firebase", "FOB\packupfirebase.sqf"]; if (_debug) then { player sidechat "firebase deployed, adding packup option"; }; _a = 2; }; if ( (speed _MV22 != 0 || isEngineOn _MV22) && (_a != 0) ) then { _MV22 removeAction _deploy; _MV22 removeAction _packup; _a = 0; if (_debug) then { player sidechat "you're moving! removing actions"; }; }; if (_pilot != driver _MV22) exitWith { _MV22 removeAction _deploy; _MV22 removeAction _packup; _a = 0; if (_debug) then { player sidechat "driver got out or got shot - removing actions"; }; }; sleep 1; }; if (true) exitWith {}; Many thanks for all your excellent debugging skills and advice on syntax. PS - The job of this (and related scripts) is to create a MP compatible, deployable base via osprey delivery, the idea being that there can only ever be one on the map at a time. In order to get it working, I've had to wrestle around compatibility with norrin's excellent revive scripts and the lkscript pack (which is regretably designed for SP only and makes MASSIVE use of action menu commands added to "player" - locality an issue!) Mission nearly ready, just need to create respawning insurgents that make use of the UPSMONS script (and remember that they have to patrol when they respawn!) Oh the joys of scripting =]
  8. while loop is now working, thanks for the fix! Only problem now is the actions are being repeatedly added!! I've edited the for loops to include a check variable: // script to allow pilot of MV22 to deploy firebase when landed with engine off // script is fired by a GETIN event handler for the pilot only // passed parameters of vehicle and driver // requires a marker named firebase to be placed in editor private ["_deploy","_packup"]; _debug = true; if (_debug) then { player sidechat "DeployFOB.sqf has started successfully"; }; _MV22 = _this select 0; _pilot = _this select 1; _a = 0; if (_debug) then { _string = format ["Vehicle passed : %1 \n Pilot passed : %2 \n value of firebase : %3",_mv22,_pilot,firebase]; player sidechat _string; player sidechat "beginning main loop"; _string = format ["mv22 alive chack : %1",(alive _MV22)]; player sidechat _string; }; while {(alive _MV22)} do { if (!(local _MV22) || _pilot != (driver _MV22) || !(isplayer (driver _MV22))) exitWith { player sidechat "something fucked up"; }; if (_debug) then { player sidechat "valid call of deployFOB script"; }; if (speed _MV22 == 0 && !(isEngineOn _MV22) && !(firebase) && (_a != 1) then { _deploy = _MV22 addAction ["Deploy Firebase", "FOB\firebase.sqf"]; if (_debug) then { player sidechat "Adding deploy firebase action"; }; _a = 1; }; if (speed _MV22 == 0 && (firebase) && (_MV22 distance (getmarkerpos "firebase") < 20) && (_a != 2) ) then { _packup = _MV22 addAction ["Pack up Firebase", "FOB\packupfirebase.sqf"]; if (_debug) then { player sidechat "firebase deployed, adding packup option"; }; _a = 2; }; if (speed _MV22 != 0 || isEngineOn _MV22) then { _MV22 removeAction _deploy; _MV22 removeAction _packup; if (_debug) then { player sidechat "you're moving! removing actions"; }; }; if (_pilot != driver _MV22) exitWith { _MV22 removeAction _deploy; _MV22 removeAction _packup; if (_debug) then { player sidechat "driver got out or got shot - removing actions"; }; }; sleep 1; }; if (true) exitWith {}; AND NOW IT'S BROKEN AGAIN!!! AAAARGGGGHHHH!!!! firebase is a boolean variable (true/false) why can't it be compared to either value? what's wrong with (firebase == true) to return a boolean result?
  9. eventhandler being called from init line of the vehicle: this addEventHandler ["GETIN",{if ((_this select 1) == "driver") then {[_this select 0, _this select 2] execVM "FOB\deployFOB.sqf"}}]; event handler is firing successfully - I am seeing deplyFOB.sqf producing sidechat when I enter vehicle as driver. The global variable firebase is defined as false in init.sqf and made public with publicvariable. As a side note, I'm also running this respawn script from init.sqf also: // script to respawn MV22 mobile FOB deployer // adds the event handler back as well as respawning // a complete rip-off of norrins MHQ revive script =] if (!isServer) exitWith {}; _MV22 = _this select 0; _respawn_delay = _this select 1; _MV22_dir = getDir _MV22; _MV22_pos = getPos _MV22; _type_MV22 = typeOf _MV22; waitUntil {!alive _MV22}; _wait = time + _respawn_delay; waitUntil {time > _wait}; _MV22_new = _type_MV22 createVehicle _MV22_pos; _MV22_new setDir _MV22_dir; _MV22_new setPos _MV22_pos; _init = "this addEventHandler ['GETIN',{if ((_this select 1) == 'driver') then {nul = [_this select 0, _this select 2] execVM 'deployFOB.sqf'}}]"; _MV22 setVehicleInit _init; processInitCommands; [_MV22_new, 600] execVM "respawnmv22.sqf"; if (true) exitWith {};
  10. nice find, thank you. Script still not functioning as intended though - still showing same problem =[ I've now inserted a debug sidechat as the first line in the while loop and set the while condition to true for debug purposes - nothing!
  11. TurokGMT

    Local Title/Hint

    in the stickies there's a guide to MP locality, might wanna try there for some self help
  12. need to resynchronise the new player vehicle with the module - check the comref, and look for sync - I forget the full command name, but it's what you need.
  13. to be double sure, put the isserver check in the onactivation field and as the first line in your script
  14. TurokGMT

    Wrong SQF Syntax?

    could you not combine some of those horrible nested IFs using AND? if ((Ziel1) && (Ziel2) && (Ziel3) && (Ziel4)) then { player setCurrentTask tskZiel4; } ...etc...
  15. you need a command that can identify an admin from any old client (I suspect that taking apart one of those bloody irritating 1337 h@x0r cheats which can be found on dodgy russian websites might help with this) Alternatively, look through the comref. Once you've found your command, you could just dump a trigger into your mission that will only activate for admin via a radio command perhaps. Just thinking out loud here btw.
  16. you could do it dynamically with a script (this won't be elegant, as I'm making it up on the fly): _AbleToFight = true; while {_AbleToFight} do { if ({alive _x} count units _mygroup <= 3) then { _AbleToFight = false; }; }; null = [unitLeader] execvm "Reinforce.sqf"; contents of Reinforce.sqf does the following: 1. Spawn reinforcement units (possiby at a marker location, or simply in a helicopter that is also spawned say 1km north of the unitleader) 2. Assign the position of the unitleader as the destination of a move waypoint 3. Waits until the reinforcements are within a certain radius of the unitleader 4. Makes the reinforcements join the group of the leader
  17. remember to empty the guys inventory before you start! removeallweapons this; this addmagazine "magazineclassname"; // repeat how many you want this addweapon "gunclassname";
  18. very likely that the empty chutes are being spawned by client machines activating a triggers from the editor. Use the isServer command to ensure only the server executes the code - ie you can't stop clients activating the trigger, but you CAN stop clients running the OnActivation code eg: if (isServer) then {null = execvm "MySweetAssScript.sqf"};
  19. pass the parameter as an object, then convert it to a string. I believe there is a command in the comref somwhere that converts to string, even something simple like format should do it: _groupstring = format ["%1",_groupParameter]; _group = createGroup _groupstring;
  20. Getting AI to land has always been a serious pain in the arse. Read through the forums on heli insertion/extraction, there a couple of good MP compatible demo missions out there.
  21. param1 = 2 is not a boolean, it sets param1 equal to 2. You need param1 == 2 to check the value of the parameter eg: [param1 == 2] || [param1 == 4] || [param1 == 12]; where || is shorthand for the OR operator, similar to && for AND Remember that OR and AND check boolean (true/false) values.
  22. Use search function. This is a known bug with trying to use the first aid modules in MP. Just delete the first aid modules and all should be well. Yes it's a pain, and yes I hope it gets fixed in next patch.
  23. don't use a briefing.html, use a briefing.sqf and call it from init.sqf - works fine for me
  24. TurokGMT

    Saving Weapons

    isn't there a way to lock a corpse - could've sworn there was a command for that. alternatively you could just deletevehicle on the corpse upon respawn.
  25. not sure about norrin's revive script and its compatibility with SOM. Guess it should be fine with a little tweaking, as long as you remember to worry about resynching with the SOM after revive again - not sure how exactly norrin handles getting killed, whether it respawns a new vehicle or sets the health of the old one back to alive status...
×