Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About blasturbator

  • Rank
  1. Edit: Nvm close this please. i just fixed the dedicated server issue (forgot to do an isDedicated check) so now putting the script in the vehicle init isn't required. Hey guys, i've been away from the ArmA scene for a while but it's all coming back pretty quick. I feel like ArmA is lying to me; in the init of a vehicle i have the following: nul = [this] execVM "scripts\mhq\respawnmhq.sqf"; and the first two lines of respawnmhq.sqf are: _mhqveh = _this select 0; _vehiclepos = getPos _mhqveh; So then when i launch the mission to test in the editor it has the gall to say respawnmhq.sqf has an: "Error getpos: Type Array, expected Object,Location". Correct me if I'm wrong, but there is no damn array in there right? [this] is an array with a single item from what i know but it's in the vehicle init not the script, _mhqveh is defined as the 'this' from within the array so is that causing it to think _mhqveh is an array? If so is there another way to execVM that script from the vehicle init? I'm doing this to avoid putting this script in the Init.sqf because really it doesn't need to go in there and if i do that it activates twice on dedicated servers but that's another issue entirely (which I'm pretending doesn't happen).
  2. blasturbator

    Enemy occupation system (eos)

    Does anyone know how you can define the init of the units spawned by EOS? ALiVE has (or had) a similar array style spawning method and i did it in that before but i got a new computer since then and don't have my old HDD with the script i made on it :(
  3. So i'm trying to get ace insurgency 1.50 takistan by pogoman, fireball and kol9yn working, but the server will only show up when ran as a dedicated server. Everything works fine on dedicated except the gear crates which spawn with the MHQ. On closer examination it seems the gear box is placed in the mission and named "stuffbox" which is then filled by another script. I assume it moves to the location the mhq is deployed at once the mission loads, so i am now looking for that script instead as that seems to be what isn't working. Found it (marked with a comment saying Here it is): westVehicleChecker = { private ["_vcl","_pos","_range","_driver","_plrs","_str"]; if (!alive MHQ && startLocation == MHQ) exitWith { _vcl = createVehicle [MHQTYPE, spawnPos, [], 0, "None"]; _vcl setVehicleInit format["this setVehicleVarName ""%1""; %1 = this;", "MHQ"]; processInitCommands; HQ setDir (getDir vehicleServicePoint + 90); _pos = vehicleServicePoint modelToWorld [10,0,0]; _pos set [2,0]; HQ setPosATL _pos; }; if (startLocation != HQ) exitWith {}; _pos = startLocation modelToWorld [3,20,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (helipad modelToWorld [0,0,0]) > 50) then { helipad setPosATL _pos; helipad setDir (getDir startLocation - 90); }; _pos = startLocation modelToWorld [0,-10,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (vehicleServicePoint modelToWorld [0,0,0]) > 50) then { vehicleServicePoint setPosATL _pos; vehicleServicePoint setDir (getDir startLocation - 90); vehicleServicePoint setCaptive true; }; _pos = vehicleServicePoint modelToWorld [-8,0,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (repairarea modelToWorld [0,0,0]) > 50) then { repairarea setPosATL _pos; repairarea setDir (getDir vehicleServicePoint); }; _pos = startLocation modelToWorld [-3,-8,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (baseflag modelToWorld [0,0,0]) > 50) then { baseflag setPosATL _pos; baseflag setDir (getDir startLocation); }; _pos = startLocation modelToWorld [8,0,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (HQ modelToWorld [0,0,0]) > 50) then { fieldHospital setPosATL _pos; fieldHospital setDir (getDir startLocation); fieldHospital setCaptive true; }; _pos = vehicleServicePoint modelToWorld [0,4,0]; _pos set [2,0]; if (getMarkerPos "USFLAG" distance (stuffbox modelToWorld [0,0,0]) > 50) then { stuffbox setPosATL _pos; //////////////////Here it is///////////////////// stuffbox setDir (getDir vehicleServicePoint - 180); }; for "_i" from 0 to (count westVehicleStrings - 1) do { _str = westVehicleStrings select _i; // isNil _str check if the vehicle is undefined // note that, _str does NOT get wrapped in quotes because _str contains the vehicle name // and we are checking for the presence of the vehicle, I assume _str whill always be a valid string if (isNil _str) then { _i call resetWestVehicle; } else { _vcl = call compile _str; // _vcl should not be NIL here .... due to ( isNil _str) protecting us // but it could be anything, so ... check its an object if (typeName _vcl=="OBJECT") then { if ( isNull _vcl) then { _i call resetWestVehicle; } else { call checkVehiclesNearbyCampObjs; if (!alive _vcl) then { _i call resetWestVehicle; } else { scopeName "main"; _range = 400; if (typeOf _vcl == ATVTYPE) then { _range = 100; }; if (typeOf _vcl == HELITYPE && heliRC == 1) exitWith { breakTo "main"; }; _plrs = nearestPlayers(getPosATL _vcl,SPAWNRANGE,false,"array"); if (alive _vcl && !arrCanSee(_plrs,_vcl,45,_range) && _vcl distance startLocation > 100) then { _driver = driver _vcl; _gunner = gunner _vcl; if (!isNull _driver || !isNull _gunner) then { if (alive _driver || alive _gunner) exitWith { breakTo "main"; }; }; { moveOut _x; } forEach (crew _vcl); _i call resetWestVehicle; }; }; }; }; }; sleep 0.01; }; }; And this is the only script that calls that function (included in the initserver.sqf): private ["_PGroup","_WCTime","_BCTime"]; _PGroup = group pilotController; _WCTime = time; _BCTime = time; while { true } do { call westVehicleChecker; if (heliRC == 1) then { call pilotAI; }; call quickCleanup; call longCleanup; if (livesLeft == 0 && time > 30) then { if (nearestPlayers(CENTERPOS,AORADIUS,true,"count") == 0) then { endMission "LOSER"; }; }; sleep 1; };
  4. blasturbator

    Medkits and a trigger bug

    Thanks for the tip, i'll see what i can do with these :)
  5. Two seperate issues again this time. I'll start with medkits, is it possible to make it so all players an use a medit to 100% heal a friendly rather than just the combat medic, without making all player slots combat medics? And secondly can anyone see why this trigger activation wouldn't work (its in a function so _this is necessary) _this setTriggerStatements ["player in thislist","nul = [intel,thistrigger] execVM 'core\modules\cacheScript\intelPickup.sqf' ", ""];
  6. blasturbator

    creating public variables

    Yeah i got this working hours ago, but thanks for replying. The hard way was necessary because i also needed to give the vehicle a varName for use as string storage so i could delete and recreate it in a function with the same name and public variable by calling on the varName to define both. Was a pain to get going but it works now :)
  7. blasturbator

    creating public variables

    That... doesn't quite answer my question or show that you even read the script snippet.
  8. blasturbator

    Description.ext CTD

    OR SO I THOUGHT. So the triggers don't want to activate for some reason. Using hints to debug i narrowed it down to that, they get created, they just wont activate. this is the statements line: _this setTriggerStatements ["player in thislist","nul = [intel,thistrigger] execVM 'core\modules\cacheScript\intelPickup.sqf' ", ""]; What i don't understand is how that suddenly doesnt work when it did work that one time. It's worked twice actually, but the rest of the time it hasn't and i didnt change a single thing in the trigger statements.
  9. would this work to make 8 things that have numbered names i.e. name1, name2, name3, etc and have a public variable for each also named name1, name2, name3, etc? for "_i" from 0 to 8 step 1 do { call compile format ["_name = 'name%1'", _i]; obj createVehicle [the createVehicle stuff]; obj setVehicleVarName _name; obj call compile format ["%1=_This ; PublicVariable '%1'",_name]; }; Also is there any way to retrieve the name of a unit? like getVehicleVarName or some magic. edit: found the answer to second question, still wondering if first would work.
  10. blasturbator

    Description.ext CTD

    It's a classname? I thought it was just the trigger name edit: Object = createTrigger [type, position] no shit, guess i shouldnt have changed that then xD I have much to learn edit: Yay it's working! man that was a hassle. Thanks very much for your help magirot, i'll put you in the mission credits ;) Now i only have one other problem to deal with and my mission is all set, until i try to add stuff to it again xD
  11. blasturbator

    Description.ext CTD

    Good catch, i make a lot of typos huh. I'm not entirely sure _intelCase setVehicleVarName _name; call compile format["%1 = _intelCase", _name]; was recommended to me when i was having troubles making it work as intended and i just went with it. I just changed it because it made more sense while reading it, it doesn't affect anything down the line. edit: Okay ao the briefcase is spawning now :D i guess using EH really fixed it. The trigger however is still not working, i'll report back after i put it into a function like you suggested.
  12. blasturbator

    Description.ext CTD

    Derp >.< i need to stop typing things and start copy/pasting them. Okay now it's stopping at 2/3. 3/3 should be showing when i kill something but it doesn't, so i guess that means the EH isn't being added to the unit.
  13. blasturbator

    Description.ext CTD

    Sorry i should have been more accurate with what i changed, i did indeed put if "isServer then {" instead of "if (isServer) exitWith {};" and i removed the line completely from briefcaseintel.sqf I have only really used BIS_fnc_MP when creating addActions so i don't know how i'd implement that for a trigger :s But i'll sort that out after i get it working in singleplayer i guess. this is the loop currently: if isServer then { [] spawn { while {TRUE} do { hint format ["1/3"]; { if (!isPlayer _x && (_x getVariable ["intelVar", FALSE])) then { hint format ["2/3"]; _x addEventHandler ["Killed", {[_this select 0] execVM "scripts\briefcaseintel.sqf"}]; _x setVariable ["intelVar", TRUE]; }; } forEach allUnits; sleep 10; // loops through all the units every 30 seconds }; }; }; and this is briefcaseintel.sqf currently: private["_obj", "_trig"]; _obj = _this select 0; _name = "intel"; hint format ["3/3]; _intelCase = createVehicle ["Land_Suitcase_F", _obj modelToWorld [0,0,0] ,[] , 0, "can_collide"]; _intelCase setVehicleVarName _name; call compile format["%1 = _intelCase", _name]; _trig = createTrigger ["CaseTrigger",getPos _obj]; _trig setTriggerActivation ["WEST", "PRESENT", false]; _trig setTriggerArea [2, 2, 0, false]; _trig setTriggerStatements ["player in thislist","nul = [intel,thistrigger] execVM 'scripts\intelPickup.sqf' ", ""]; I've noticed the hints dont reach 2/3 so it doesnt seem to make it past the if then in the loop
  14. blasturbator

    Description.ext CTD

    Well, i added isServer already once you pointed out it said isDedicated, that was an error due to me overlooking the first line. The eventhandler is probably a better idea but getting it working comes first i think, hey maybe the EH will fix whatever the problem is :P addactionMP is defined elsewhere and is in fact from a previous attempt which involved an addaction instead of a trigger, i left it commented out but never removed it, that's gone now though. So really i should just add the hint at various steps, could do 1/3, 2/3, 3/3 to find the problem i guess. And i'll try the eventhandler instead of the waituntil.
  15. blasturbator

    Description.ext CTD

    ah lol no i didn't, that was just a typo when i copy pasted what i wrote in the reply :P But yeah the script doesn't work without the '_this select 0' and using [_x] didn't work either ;-; edit: didnt see the isDedicated, it was meant to be (isServer), that apparently was not the issue though.