Jump to content
Sign in to follow this  
demonized

addaction removeaction problem

Recommended Posts

I have a MP mission with a addaction problem:

When a trigger is activated by bluefor present, it switches a hold wp for ai in a littlebird, then AI lb goes to a point to pickup some MP players.

Littlebird is named lb1 in editor, and goes to a move wp with

lb1 land "GET IN"

and then a hold wp is on a invicble h near the move wp.

When i enter lb1 i get action and clicks it and it disapears as it should and heli moves on to transport unload wp with

lb1 land "GET OUT"; unassignVehicle player; doGetOut player;

on the first move wp i have this in a trigger activated by bluefor present and player in lb1

condition:

this AND player in lb1

on activate:

lb1 addaction ["ALL IN, MOVE TO LZ", "specopgtg.sqf"]; 

specopgtg.sqf

stingerraid = true;
//remove ALL IN, GO!! action from LB
//1 From what
_specoplb = _this select 0;

//2 Remove all player added actions from the object.
_action = lb1 addAction ["ALL IN, MOVE TO LZ", "specopgtg.sqf"];
while {_action >= 0} do	{
_specoplb removeAction _action;
_action = _action - 1;
};
//END

A switch trigger synched with hold wp is activated by checking if stingerraid is true(from specopgtg.sqf),

condition:

stingerraid

on activate:

stingerraid = false

wich sends lb on to his waypoints and finally transport unload wp.

Then when player completes an objective, lb1 comes back to pickup players following exact same method as first pickup and dropping them at a transport unload wp.

Problem is: in our dedicated server when im outside lb at second pickup and noone is in lb1 but ai pilot is in, i see the action, when im in, i get action, but when i click it disappears but lb doesnt move to transport unload wp. seems switch trigger(same as in 1st pickup) doesnt recognise stingerraid = true again.

Worked nicely at first pickup point on server.

but when objective was completed and LB came back to player for pickup, using same approach in waypoints and triggers as first pickup this problem came to light.

Any ideas?

Edit: in specopgtg.sqf, do i need to add:

publicVariable "stingerraid";

do i need this after stingerraid = true?

For this to work on dedicated server, im suspecting a locality problem, but am not skilled enough to see it.

I could just eliminate all scripts and simply have a timer on switch trigger, say 60 seconds from lb touches down, but id like this action so that player can have lb wait for other players or just move on right away if all players are in lb.

Will this new specopgtg.sqf work?

if (isServer) then {
stingerraid = true;
publicVariable "stingerraid";
//remove ALL IN, GO!! action from LB
//1 From what
_specoplb = _this select 0;

//2 Remove all player added actions from the object.
_action = lb1 addAction ["ALL IN, MOVE TO LZ", "specopgtg.sqf"];
while {_action >= 0} do	{
	player removeAction _action;
	_specoplb removeAction _action;
	_action = _action - 1;
};
};
//END

Edited by Demonized
do i need a publicvariable on stingerraid?

Share this post


Link to post
Share on other sites

I worked around the problem by simply having lb1 move to player, pick them up, then drop them off, and go back to base as last wp, last wp i have

deleteVehicle lb1; deleteVehicle lb1pilot;

Then i have another lb, named lb2, doing same pickup and same drop of procedure as lb1, but land at base and get out as last wp. players is non the wiser, as far as they are concerned thats the same lb :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×