Jump to content

Recommended Posts

Hello,

 

So I've made a mission but i couldnt figure out the HQ script. there is 1 commander in the mission concept but when the commander deploys the HQ via addAction it works very well, however, when I destroy the building which is in this case Land_Cargo_HQ_V1_F the script stops and the building turns into Land_Cargo_HQ_V2_ruins_F my question is how do I make this look like destroyed? when it turns to ruins people can still respawn on the HQ.. 

 

Thank you very much

(paramsArray select 5);
_officer = _this select 0;

//figure out place of future HQ
_dir = round (getDir _officer);
_xofficer = getPos _officer select 0;
_yofficer = getPos _officer select 1;
_x = ((sin _dir) * 10) + _xofficer;
_y = ((cos _dir) * 10) + _yofficer;

//check proximity to capture zones and bases
_too_close = [0, ""];
{
	if (_officer distance (getMarkerPos _x) < 200) then
	{
		_too_close = [_officer distance (getMarkerPos _x), _x];
	};
} forEach ["flag_marker1", "flag_marker2", "flag_marker3", "WAREA", "EAREA"];

//create HQ if far enough from zones
if (_too_close select 0 > 0) then
{
	player commandChat format ["Cannot deploy HQ. Too close to %1 (%2 m). 200 m clearance required.", _too_close select 1, _too_close select 0];
}
else
{
	if (playerSide == EAST) then
	{
		_new_veh = createVehicle ["Land_Cargo_HQ_V1_F", [_x, _y], [], 0, "NONE"];
		_new_veh setPos [_x, _y, 0];
		_new_veh setDir _dir;
		_new_veh addEventHandler ["killed", {_this execVM "CLIENT\ForwardHQKilled.sqf"}];
		HQ_Object = _new_veh;
		publicVariable "HQ_Object";
		Forward_HQ set [3, 2];
		Forward_HQ set [4, _x];
		Forward_HQ set [5, _y];
		publicVariable "Forward_HQ";
	}
	else
	{
		_new_veh = createVehicle ["Land_Cargo_HQ_V1_F", [_x, _y], [], 0, "NONE"];
		_new_veh setPos [_x, _y, 0];
		_new_veh setDir _dir;
		_new_veh addEventHandler ["killed", {_this execVM "CLIENT\ForwardHQKilled.sqf"}];
		HQ_Object = _new_veh;
		publicVariable "HQ_Object";
		Forward_HQ set [0, 2];
		Forward_HQ set [1, _x];
		Forward_HQ set [2, _y];
		publicVariable "Forward_HQ";
	};

	execVM "CLIENT\ForwardHQUpdates.sqf";
};

Share this post


Link to post
Share on other sites

Would you please make comprehensive topic titles for further forum search ? Thanks :)

Sorry, my bad just my first topic :D

Share this post


Link to post
Share on other sites

Hi, If I understand well the problem if when you destroy the HQ building, you don't want to make it usable as respawn point, isn't it?

 

Then the way to do so is in ForwardHQKilled.sqf, as the script you pasted is just the FOB creation.

 

A first though is to have a global public array with the respawn point markers available, and remove from the array the marker associated with the building pos. All this done in ForwardHQKilled.sqf

Share this post


Link to post
Share on other sites

Hi, If I understand well the problem if when you destroy the HQ building, you don't want to make it usable as respawn point, isn't it?

 

Then the way to do so is in ForwardHQKilled.sqf, as the script you pasted is just the FOB creation.

 

A first though is to have a global public array with the respawn point markers available, and remove from the array the marker associated with the building pos. All this done in ForwardHQKilled.sqf

 

Hi Barbolani,

 

Splendid answer, however, I still want to post the ForwardHQKilled.sqf to check if everything is ok in the script. I still dont understand why the HQ is still undestroyed when I actually destroy it, somehow its not removing the HQ spawnpoint but turns into a Ruined HQ which is still spawnable.. 

 

ForwardHQKilled.sqf as followed;

_HQ = _this select 0;
//player commandChat "local HQ destroyed";
//diag_log text "local HQ destroyed";

if (_HQ isKindOf "Land_Cargo_HQ_V1_F") then
{
	Forward_HQ set [3, 0];
	Forward_HQ set [4, 0];
	Forward_HQ set [5, 0];
	publicVariable "Forward_HQ";
	execVM "CLIENT\ForwardHQUpdates.sqf";
	sleep 1200; 
	Forward_HQ set [3, 1];
	publicVariable "Forward_HQ";
	execVM "CLIENT\ForwardHQUpdates.sqf";
	//diag_log text "East HQ Destroyed";
	player commandChat "HQ available";
}
else
{
	Forward_HQ set [0, 0];
	Forward_HQ set [1, 0];
	Forward_HQ set [2, 0];
	publicVariable "Forward_HQ";
	execVM "CLIENT\ForwardHQUpdates.sqf";
	sleep 1200;
	Forward_HQ set [0, 1];
	publicVariable "Forward_HQ";
	execVM "CLIENT\ForwardHQUpdates.sqf";
	//diag_log text "West HQ Destroyed";
	player commandChat "HQ available";
};

ForwardHQUpdates.sqf

//player sideChat format ["%1 %2", Forward_HQ, Forward_HQ_Old];
if (playerSide == WEST) then
{
	//if HQ is created
	if ((Forward_HQ_Old select 0 < 2) and (Forward_HQ select 0 == 2))	then
	{
		_mrk = createMarkerLocal ["HQ_marker", [Forward_HQ select 1, Forward_HQ select 2]];
		_mrk setMarkerTypeLocal "b_hq"; //Creates marker on map 
		_mrk setMarkerTextLocal "Head Quarter";	// Marker with name
		player sideChat "HQ established";
		//Forward_HQ_Old = Forward_HQ
		for "_i" from 0 to 5 do { Forward_HQ_Old set [_i, Forward_HQ select _i]; };
	};
	//if HQ is destroyed
	if ((Forward_HQ_Old select 0 == 2) and (Forward_HQ select 0 == 0))	then
	{
		deleteMarkerLocal "HQ_marker";
		player sideChat "HQ destroyed";
		//Forward_HQ_Old = Forward_HQ
		for "_i" from 0 to 5 do { Forward_HQ_Old set [_i, Forward_HQ select _i]; };
	};
}
else
{
	//if HQ is created
	if ((Forward_HQ_Old select 3 < 2) and (Forward_HQ select 3 == 2))	then
	{
		_mrk = createMarkerLocal ["HQ_marker", [Forward_HQ select 4, Forward_HQ select 5]];
		_mrk setMarkerTypeLocal "o_hq"; //Creates marker on map
		_mrk setMarkerTextLocal "Head Quarter";	//Created marker with name Marker
		player sideChat "HQ established";
		//Forward_HQ_Old = Forward_HQ
		for "_i" from 0 to 5 do { Forward_HQ_Old set [_i, Forward_HQ select _i]; };
	};
	//if HQ is destroyed
	if ((Forward_HQ_Old select 3 == 2) and (Forward_HQ select 3 == 0))	then
	{
		deleteMarkerLocal "HQ_marker";
		player sideChat "HQ destroyed";
		//Forward_HQ_Old = Forward_HQ
		for "_i" from 0 to 5 do { Forward_HQ_Old set [_i, Forward_HQ select _i]; };
	};
};

I Hope you can help me out 

Share this post


Link to post
Share on other sites

Sorry, my bad just my first topic :D

Changed it to something more meaningful. :)

Share this post


Link to post
Share on other sites

Changed it to something more meaningful. :)

 

Thank you very much, wont happen again :D

Share this post


Link to post
Share on other sites

Bump bump

 

First error, you are using isKindOf when what you want is typeOf, so:

 

if (_HQ isKindOf "Land_Cargo_HQ_V1_F") then BAD

 

if (typeOf _HQ == "Land_Cargo_HQ_V1_F") then GOOD!

 

Ok, anyway, something should have fired for you, because you used "else {}" in the EH part, so, that part should have been executed.

 

More thoughts:

 

I assume MP. Then everything should be done server sided. Then this will only work in hosted as I've seen "player" here and there. If it's SP, no problem.

 

But if it's MP, you should care about locality issues on EH execution.

 

Second thought: Have you tried to debug it removing the comments from://player commandChat "local HQ destroyed"; //diag_log text "local HQ destroyed"; ?

 

If so, did those fired? If not, I bet you the locality MP thing.

 

More thoughts: IMHO you use a very strange way to store HQ positions and data in arrays.

 

I suggest you to keep it clean, foolish and simple. Such as:

 

Use a variable for the building object, like: HQ_building = createVehicle blah blah...

 

To check if the building is alive in the updater, a simple (alive HQ_building) is enough, no need of additional variables or array params.

 

I am not really understanding what you want to achieve when the HQ is destroyed and thus wat you will need to check, but I bet you a combination of "alive" object and typeOf object is everything what you need to know what's happening in your HQ and the things player can or cannot do.

 

Hope it helped.

  • Like 1

Share this post


Link to post
Share on other sites

Bump bump

 

First error, you are using isKindOf when what you want is typeOf, so:

 

if (_HQ isKindOf "Land_Cargo_HQ_V1_F") then BAD

 

if (typeOf _HQ == "Land_Cargo_HQ_V1_F") then GOOD!

 

Ok, anyway, something should have fired for you, because you used "else {}" in the EH part, so, that part should have been executed.

 

More thoughts:

 

I assume MP. Then everything should be done server sided. Then this will only work in hosted as I've seen "player" here and there. If it's SP, no problem.

 

But if it's MP, you should care about locality issues on EH execution.

 

Second thought: Have you tried to debug it removing the comments from://player commandChat "local HQ destroyed"; //diag_log text "local HQ destroyed"; ?

 

If so, did those fired? If not, I bet you the locality MP thing.

 

More thoughts: IMHO you use a very strange way to store HQ positions and data in arrays.

 

I suggest you to keep it clean, foolish and simple. Such as:

 

Use a variable for the building object, like: HQ_building = createVehicle blah blah...

 

To check if the building is alive in the updater, a simple (alive HQ_building) is enough, no need of additional variables or array params.

 

I am not really understanding what you want to achieve when the HQ is destroyed and thus wat you will need to check, but I bet you a combination of "alive" object and typeOf object is everything what you need to know what's happening in your HQ and the things player can or cannot do.

 

Hope it helped.

 

Hello barbolani, 

 

HOLY SHIT IT WORKED!  I bombed the HQ (Land_Cargo_HQ_V1_F) it said '' HQ destroyed  '' now the button for spawning on HQ is removed so players cant spawn anymore untill the ''commander'' deploys another HQ i think the problem was what you mentioned if (typeOf _HQ == "Land_Cargo_HQ_V1_F") 

 

THANK YOU!

Share this post


Link to post
Share on other sites

There's a lot going on here. First thing though, do you really want that "sleep 1200" (that's 20 minutes) in your killed Event Handler? What is its purpose? Second, how are you setting respawn in your description.ext file? If it's not "BASE" then your units will never be able to respawn on markers (I'm assuming it is though).

 

Moving right along... So you want to create an addAction on some player. This would allow player to create a building and then (through some scripting) also put a respawn marker at the building's location. Is this accurate?

 

If so...

1) addAction is a local command. I.E., the script will run once on the specific player's machine.

2) createVehicle is a global command. I.E., it will run once on all machine's (including the server) each time it is used.

3) "killed" is a local event handler. I.E., it will run where the "killed object" is local. I'm not entirely sure what will happen when placed on a globally created vehicle.

4) createMarkerLocal/deleteMarkerLocal are local commands.

 

That was all just an FYI so you understand (as barbolani pointed out) the locality involved here.

 

Lastly, assuming you have "BASE" set in your description.ext, I still fail to see where you are actually placing a respawn marker. Your code is this:

_mrk = createMarkerLocal ["HQ_marker", [Forward_HQ select 4, Forward_HQ select 5]];

Which does not create a respawn marker. All such markers must begin with the word "respawn." See https://community.bistudio.com/wiki/Arma_3_Respawnfor more info. I suspect you simply have the starting respawn location around the same spot where you are testing, thus (since there are no respawn markers) the players simply respawn where they started the mission at.

  • Like 1

Share this post


Link to post
Share on other sites

There's a lot going on here. First thing though, do you really want that "sleep 1200" (that's 20 minutes) in your killed Event Handler? What is its purpose? Second, how are you setting respawn in your description.ext file? If it's not "BASE" then your units will never be able to respawn on markers (I'm assuming it is though).

 

Moving right along... So you want to create an addAction on some player. This would allow player to create a building and then (through some scripting) also put a respawn marker at the building's location. Is this accurate?

 

If so...

1) addAction is a local command. I.E., the script will run once on the specific player's machine.

2) createVehicle is a global command. I.E., it will run once on all machine's (including the server) each time it is used.

3) "killed" is a local event handler. I.E., it will run where the "killed object" is local. I'm not entirely sure what will happen when placed on a globally created vehicle.

4) createMarkerLocal/deleteMarkerLocal are local commands.

 

That was all just an FYI so you understand (as barbolani pointed out) the locality involved here.

 

Lastly, assuming you have "BASE" set in your description.ext, I still fail to see where you are actually placing a respawn marker. Your code is this:

_mrk = createMarkerLocal ["HQ_marker", [Forward_HQ select 4, Forward_HQ select 5]];

Which does not create a respawn marker. All such markers must begin with the word "respawn." See https://community.bistudio.com/wiki/Arma_3_Respawnfor more info. I suspect you simply have the starting respawn location around the same spot where you are testing, thus (since there are no respawn markers) the players simply respawn where they started the mission at.

 

Hello Emrak,

 

Thank you for your reply However I'll answer your thoughts about this script. This is a PvP Mission so when the HQ is destroyed the commanders should know that the HQ is a very important object to spawn on thats why the sleep 1200 for 20 minutes untill a new hq is available, Respawn is set on ''BASE'' in description as you assumed.

 

The mission has 2 Bases and 2 respawn points which are respawn_west and respawn_east the units are spawning on these spawnpoints.

 

Only the commander has the addAction for deploying the HQ, the addAction for this is 

//Add Create HQ option to commanders
if (rank player == "LIEUTENANT") then
{
    player removeAction HQActionID;
    if (playerSide == WEST) then
    {
    HQActionID = player addAction ["<t color='#FFF37A'>" + "Deploy HQ" + "</t>", "CLIENT\CreateForwardHQ.sqf", [], 10, false, true, "teamSwitchPrev", "(rank player == 'LIEUTENANT') and (Forward_HQ select 0 == 1) and (time > 300)"];
    }
    else
    {
    HQActionID = player addAction ["<t color='#FFF37A'>" + "Deploy HQ" + "</t>", "CLIENT\CreateForwardHQ.sqf", [], 10, false, true, "teamSwitchPrev", "(rank player == 'LIEUTENANT') and (Forward_HQ select 3 == 1) and (time > 300)"];
    };
}; 

This is working very well, the HQ object deploys and players are able to spawn on HQ when they are dead a menu will pop-up with weapon selection and a button for ''Respawn on HQ''

 

So, 

-addAction works fine

-Markers are accurate if the HQ is deployed a marker will be shown on map for each side.

-Players are able to spawn on HQ when they are dead, this works fine

-Commanders are able to deploy HQ

 

Now thanks too barbolani i've managed to make some things work. However, When the HQ is destroyed, players on EAST SIDE are still able to spawn on HQ which is bad! the button should be removed but the strange thing is players on WEST side are not able to spawn on HQ when it's destroyed which is good!. I still cant figure this out because its freaking confusing.. 

 

Conclusion:

 

Why the hell is the script not working for  the EAST side players able to respawn on HQ when it's destroyed??? this needs to be removed simply if the HQ is destroyed nobody should able to spawn on HQ

 

but for some reason, the script is working for WEST side players. My brains hurt so bad  :(

 

Thank you, I hope you can help me out, 

Share this post


Link to post
Share on other sites

Ok,

 

At first glance I see no locality problems if you count on the EH killed for the buildings will only fire on the commander PC. So the commander must be the same guy during all the match.

 

The buildings are created globally and the markers, if you use global commands to create, move etc.. also won't be a problem. Maybe those createMarkerLocal will be only visible for the commander.

 

I see no references to "respawn_east" and "respawn_west" markes, I assume you have related code in some part you haven't showed yet...

 

I bet your problem regarding ability to spawn is related to those markers. I never tried to add or remove respawn markers dynamically during a mission, don't know how the respawn suite will behave. But you should check and test on that way.

 

In other words: Arma does not care about your HQ buildings position, or status (alive or not). Arma just searches for a "respawn_west" marker, which I suppose it has to be a global one. All you have to do is to link those buildings and status with whatever you have to do with the respawn marker.

Share this post


Link to post
Share on other sites

Ok,

 

At first glance I see no locality problems if you count on the EH killed for the buildings will only fire on the commander PC. So the commander must be the same guy during all the match.

 

The buildings are created globally and the markers, if you use global commands to create, move etc.. also won't be a problem. Maybe those createMarkerLocal will be only visible for the commander.

 

I see no references to "respawn_east" and "respawn_west" markes, I assume you have related code in some part you haven't showed yet...

 

I bet your problem regarding ability to spawn is related to those markers. I never tried to add or remove respawn markers dynamically during a mission, don't know how the respawn suite will behave. But you should check and test on that way.

 

In other words: Arma does not care about your HQ buildings position, or status (alive or not). Arma just searches for a "respawn_west" marker, which I suppose it has to be a global one. All you have to do is to link those buildings and status with whatever you have to do with the respawn marker.

 

 

Hello barbolani,

 

Thank you for your reply, 

 

But its not all about the markers, the markers are fine.. and its working. when player is dead hes still able to spawn on respawn_west or respawn_east with no problems.

 

Also, this is what i have added to server.init

//Forward HQ global public variable init
Forward_HQ = [1,0,0,1,0,0];
publicvariable "Forward_HQ";
Forward_HQ_Old = [1,0,0,1,0,0];
publicvariable "Forward_HQ_Old";
//Create killed EH on server, in case commander disconnects, and HQ becomes local to server
"HQ_Object" addPublicVariableEventHandler { [] execVM "SERVER\CreateHQKilledEH.sqf"};

Still no clue what is going on for EAST side players. i just want the ''respawn on HQ'' button removed if the HQ is destroyed. 

 

this is what I have in one of the scripts 

//disable forward HQ spawn if not valid
if ((playerSide == WEST) and (Forward_HQ select 0 < 2)) then { ctrlEnable [444, false]; };
if ((playerSide == EAST) and (Forward_HQ select 3 < 2)) then { ctrlEnable [444, false]; };

EDIT: I forgot the script how players are spawning on HQ.

//forward spawn unit to HQ
if (HQ_respawn) then
{
	HQ_respawn = false;
	//hint "Spawn On HQ";
	if (playerSide == WEST) then
	{
		titleText ["","BLACK OUT",1];
		sleep 1.5;
		titleText ["Spawning on HQ","BLACK FADED",1];
		player setPos [(Forward_HQ select 1) + 5 + (random 20), (Forward_HQ select 2) + 5 + (random 20)];
		sleep 2;
		titleText ["","BLACK IN",1];		
	}
	else
	{
		titleText ["","BLACK OUT",1];
		sleep 1.5;
		titleText ["Spawn on HQ","BLACK FADED",1];
		player setPos [(Forward_HQ select 4) + 5 + (random 20), (Forward_HQ select 5) + 5 + (random 20)];
		sleep 2;
		titleText ["","BLACK IN",1];		
	};
};

I'll keep working :(

Share this post


Link to post
Share on other sites

OK, I think I understand what you're saying now. Your description of the problem is confusing because you are using the words "respawn" and "spawn" incorrectly. You actually have no problem with respawn at all, I think. Here's what's actually happening:

There are two sides with two respawn markers (east and west). When they die, they respawn at the markers as they should. All is well. However, after a player has respawned at their appropriate marker, you have created a button dialog that the player may click to instantly move ("teleport") to location X. This "location X" is determined by whether or not another player (commander in this case) has activated an addAction command. If this is accurate, then here's some information.

 

When "BASE" is set in description.ext and a player dies, the game will look for any local and global markers that begins with "respawn." Understand that respawn markers have a hierarchy that starts with the player and slowly goes up. The game will:

1) Look for markers named "respawn_Player"

2) Look for markers named "respawn_Player_GroupLeader"

3) Look for markers named "respawn_Player_Side"

4) Look for any markers that start with "respawn"

5) Just spawn the player where they died.

 

So my suggestion to you would be to:

--Copy the mission folder so you have a backup

--Delete everything related to the "addAction" command (all the files, ForwardHQKilled.sqf, etc.) and your button.

 

From here, you can:

1) Create an addAction without any confusing arrays checking for numbers and so forth, such that all it does is call a script that creates a building, a marker, a trigger, and finally removes the addaction from the commander. The marker will be named "respawn_name_of_dude_who_put_the_marker_down". The building has no code associated with it. The trigger will simply be checking if the building is alive (or you can have it check the "damage" level). When the building is not alive, the trigger will run code that deletes the marker, adds the addAction back to the commander, and finally deletes itself (the trigger).

2) Or, you can do #1 but use the eventhandler (possibly mpeventhandler? not sure without testing) for the building instead of a trigger.

 

3) Or, you can do #1, but MOVE the original "respawn_west/east" marker to the current location using setMarkerPos. And on building destruction you would then setMarkerPos back to the original location. In this case there would never be another marker at all.

In all the above, what would now happen is a player would die and then respawn at the HQ directly, with no need to teleport. If you are just looking for a script to teleport to a dynamically set location, then please google. There are tons of examples.

  • Like 1

Share this post


Link to post
Share on other sites

OK, I think I understand what you're saying now. Your description of the problem is confusing because you are using the words "respawn" and "spawn" incorrectly. You actually have no problem with respawn at all, I think. Here's what's actually happening:

There are two sides with two respawn markers (east and west). When they die, they respawn at the markers as they should. All is well. However, after a player has respawned at their appropriate marker, you have created a button dialog that the player may click to instantly move ("teleport") to location X. This "location X" is determined by whether or not another player (commander in this case) has activated an addAction command. If this is accurate, then here's some information.

 

When "BASE" is set in description.ext and a player dies, the game will look for any local and global markers that begins with "respawn." Understand that respawn markers have a hierarchy that starts with the player and slowly goes up. The game will:

1) Look for markers named "respawn_Player"

2) Look for markers named "respawn_Player_GroupLeader"

3) Look for markers named "respawn_Player_Side"

4) Look for any markers that start with "respawn"

5) Just spawn the player where they died.

 

So my suggestion to you would be to:

--Copy the mission folder so you have a backup

--Delete everything related to the "addAction" command (all the files, ForwardHQKilled.sqf, etc.) and your button.

 

From here, you can:

1) Create an addAction without any confusing arrays checking for numbers and so forth, such that all it does is call a script that creates a building, a marker, a trigger, and finally removes the addaction from the commander. The marker will be named "respawn_name_of_dude_who_put_the_marker_down". The building has no code associated with it. The trigger will simply be checking if the building is alive (or you can have it check the "damage" level). When the building is not alive, the trigger will run code that deletes the marker, adds the addAction back to the commander, and finally deletes itself (the trigger).

2) Or, you can do #1 but use the eventhandler (possibly mpeventhandler? not sure without testing) for the building instead of a trigger.

 

3) Or, you can do #1, but MOVE the original "respawn_west/east" marker to the current location using setMarkerPos. And on building destruction you would then setMarkerPos back to the original location. In this case there would never be another marker at all.

In all the above, what would now happen is a player would die and then respawn at the HQ directly, with no need to teleport. If you are just looking for a script to teleport to a dynamically set location, then please google. There are tons of examples.

 

 

Hello Emrak,

 

I would like to thank you  and barbolani very very very much for all your help I really appreciate it. I made some little changes by your suggestions and I saw a little performance in the scripts. However, about the spawning on HQ when its destroyed, I managed to fix this. the problem was here;

 

Each side (WEST and EAST) they needed an different object. if the object were the same in this case "Land_Cargo_HQ_V1_F" it only works for one side, these empty assets needed to be different to make the script work; for example;

if (playerSide == EAST) then
	{
		_new_veh = createVehicle ["Land_Cargo_HQ_V1_F", [_x, _y], [], 0, "NONE"];
		_new_veh setPos [_x, _y, 0];
		_new_veh setDir _dir;
		_new_veh addEventHandler ["killed", {_this execVM "CLIENT\ForwardHQKilled.sqf"}];
		HQ_Object = _new_veh;
		publicVariable "HQ_Object";
		Forward_HQ set [3, 2];
		Forward_HQ set [4, _x];
		Forward_HQ set [5, _y];
		publicVariable "Forward_HQ";
	}
	else
	{
		_new_veh = createVehicle ["Land_Cargo_HQ_V1_F", [_x, _y], [], 0, "NONE"];
		_new_veh setPos [_x, _y, 0];
		_new_veh setDir _dir;
		_new_veh addEventHandler ["killed", {_this execVM "CLIENT\ForwardHQKilled.sqf"}];
		HQ_Object = _new_veh;
		publicVariable "HQ_Object";
		Forward_HQ set [0, 2];
		Forward_HQ set [1, _x];
		Forward_HQ set [2, _y];
		publicVariable "Forward_HQ";
	};

Should be:

if (playerSide == EAST) then
	{
		_new_veh = createVehicle ["Land_Cargo_HQ_V1_F", [_x, _y], [], 0, "NONE"];
		_new_veh setPos [_x, _y, 0];
		_new_veh setDir _dir;
		_new_veh addEventHandler ["killed", {_this execVM "CLIENT\ForwardHQKilled.sqf"}];
		HQ_Object = _new_veh;
		publicVariable "HQ_Object";
		Forward_HQ set [3, 2];
		Forward_HQ set [4, _x];
		Forward_HQ set [5, _y];
		publicVariable "Forward_HQ";
	}
	else
	{
		_new_veh = createVehicle ["Land_Cargo_HQ_V3_F", [_x, _y], [], 0, "NONE"];
		_new_veh setPos [_x, _y, 0];
		_new_veh setDir _dir;
		_new_veh addEventHandler ["killed", {_this execVM "CLIENT\ForwardHQKilled.sqf"}];
		HQ_Object = _new_veh;
		publicVariable "HQ_Object";
		Forward_HQ set [0, 2];
		Forward_HQ set [1, _x];
		Forward_HQ set [2, _y];
		publicVariable "Forward_HQ";
	};

the createvehicle needed to be different What kind of stupidness is this? i really didnt think of this. why cant we use the same empty assets for both sides.

but when i changed it, it worked. Now Both sides are not able to spawn on HQ when it's destroyed. once again, its freaking stupid found..

 

BUT most important. 

 

Thank you man, Thank you Barbaloni too for his help aswell really appreciated. Thread can marked as Solved!

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

×