Jump to content
Reynastus

Top Fun / Kamkazi - But for Arma 3

Recommended Posts

Hi All

 

I am trying to figure out how to enable respawns for one team while not for another.

 

This is for a custom TvT mode where one group is able to use planes/tanks/Prowlers to track down and kill the other team who have access to go karts, quad bikes etc.

 

This relies on the targets not being able to respawn but was hoping that the hunters would be able to respawn so that there could be shennanigans like dive bombing kamakazi runs. 

 

I was wondering if anyone could help me with getting this to work would be greatly appreciated.


Rey

Share this post


Link to post
Share on other sites

If you only want to disable respawn for OPFOR, try;

//	Stop OPFOR players from respawning.
//	When killed they will be booted to lobby.
if (side player == east) then
{
	player addEventHandler
	[
		"Killed",
		{
			endMission "LOSER";
		}
	];
};

Although...

They could just rejoin the mission again.

Share this post


Link to post
Share on other sites

Cheers,

 

Was kind of hoping that they would be booted to spectator mode or some such so that they could still watch the game. 

 

Kind of need the win condition to be all the OPFOR players to die as a win condition for the hunters, but wanted the OPFOR to be able to watch the rest of the outcome.

 

Out of curiosity though where would you put that piece of code? I am brand new to coding/anything programming in nature.


Regards

 

Rey

Share this post


Link to post
Share on other sites
2 minutes ago, Reynastus said:

Was kind of hoping that they would be booted to spectator mode or some such so that they could still watch the game.

Cool. Should have specified.

if (side player == east) then
{
	[ "Initialize", [ player ] ] call BIS_fnc_EGSpectator;
};

 

6 minutes ago, Reynastus said:

Kind of need the win condition to be all the OPFOR players to die as a win condition for the hunters, but wanted the OPFOR to be able to watch the rest of the outcome.

I'm not 100% sure.

//	I'm not sure if spectating players change side.
if ((east countSide allPlayers) == 0) then
{
	"SideScore" call BIS_fnc_endMissionServer;
};

 

6 minutes ago, Reynastus said:

Out of curiosity though where would you put that piece of code? I am brand new to coding/anything programming in nature.

Place both in onPlayerKilled.sqf inside your mission folder.

 

Test it though.

  • Like 1

Share this post


Link to post
Share on other sites

cool thanks for the help

 

just curious though, the code above - would that work if the runners were civilians? aiming for the runners to be unarmed is all. 

 

or to make that work would you change the east to civilian?

Share this post


Link to post
Share on other sites
34 minutes ago, Reynastus said:

or to make that work would you change the east to civilian?

Assuming the script works... Correct!

 

36 minutes ago, Reynastus said:

aiming for the runners to be unarmed is all.

You could also keep the runners as OPFOR / east side and just remove their kit via the editor.

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

×