Forum Jump :

Author Message

Posts: 31

Level: Member

Country: be
Location: Flanders
Occupation: student
In-game name:

#1 Posted at 2017-08-31 08:38        
So i'm helping out on a mission where we want to spawn in triggers for service pads. We got them to work on a LAN server but they don't work when we put that mission file on a dedicated server. Anybody know what the problem could be?

The code we're using:

The service pads are only supposed to unlock after certain events.
So we call them in in the Main_Machine.sqf, which is started by the initserver.sqf like this:

mainObjScript = [] execVM "Missions\Main\Main_Machine.sqf";

in this file this is how we call the function that actually spawns the trigger:
[currentAO] call AW_fnc_BaseManager;

In that function this is the code that spawns the trigger:
_serviceTrigger = createTrigger ["EmptyDetector", (getPos GuardianGroundServicePad) , true];
_serviceTrigger setTriggerActivation [ "WEST" , "PRESENT", true];
_serviceTrigger setTriggerArea [6, 6, 0, false, 3];
_serviceTrigger setTriggerStatements ["this", "[vehicle (thisList select 0)] execVM 'scripts\vehicle\rearmGround.sqf';", ""];

And the rearmground.sqf looks like this:
(I'm well aware that this is rather old code that could definitely use some tweaking. For now however it works so it's not that high on my todo list)

If you're going through hell,
keep going! -W. Churchill

Author Message

Posts: 136

Level: Member

Country: us
Location: Pennsylvania
In-game name: Xian

#2 Posted at 2017-09-12 04:17        
Are these just for repair/rearming/refueling vehicles and such in one location or is a location that will constantly move?

Because if its in the same location, why not just avoid the script creation part of it and throw down a full trigger with the same parameters? That's worked on my dedicated box for MP repairs and such.