Jump to content
Sign in to follow this  
Taxen0

Respawn issues, Zeus

Recommended Posts

Hello,

I have a zeus set up in my mission and the following in my description.ext

respawn = "BASE";
respawndelay = 10;
respawnDialog = 1;
respawnTemplatesWest[] = {"MenuPosition","MenuInventory"};
respawnTemplatesEast[] = {"MenuPosition","MenuInventory"};
respawnTemplatesLogic[] = {};
respawnOnStart = 1;	
disabledAI = 1;
joinUnassigned = 1;
aiKills = 1;

But at the mission start the player controlling zeus will get a flickering loading image (while the 10 sec respawn is counting)

and after, zeus will spawn at the edge of the map.

So I guess the Zeus player is following the regular respawn settings and gets sent off since there is no marker.

I have tried to change respawnTemplatesLogic[] = {"X"}; to different types of spawns but I see no real difference, is there a way to

remove respawn completely for the curator? it's a virtual one.

Thanks!

Share this post


Link to post
Share on other sites

You shouldn't need to use "respawnTemplatesLogic[] = {};" at all.

Try this:

Add the following to your Description.ext after the respawn lines you posted above

#ifdef _PARAMTYPE

class Type

{

title = $STR_DISP_ARCGRP_TYPE; //--- ToDo: Localize

values[] = {0,1};

texts[] = {$STR_A3_CfgMPGameTypes_Coop_name_0,$STR_A3_CfgMPGameTypes_DM_name_0}; //--- ToDo: Localize

default = 0;

isGlobal = 1;

file = "paramType.sqf";

};

#endif

Now, create a .sqf called "paramType.sqf" and add this:

private ["_type"];

if !(player call bis_fnc_isUnitVirtual) then {

_type = _this select 0;

if (_type > 0) then {

_fnc_init = {

_this spawn {

_player = _this select 0;

if !(alive _player) exitwith {};

waituntil {!([] call bis_fnc_isLoading)};

_player addrating -1e10;

_para = createvehicle ["Steerable_Parachute_F",position _player/*[position _player select 0,position _player select 1,100]*/,[],50,"fly"];

_player moveindriver _para;

};

};

[player,objnull] call _fnc_init;

player addeventhandler ["respawn",_fnc_init];

};

};

Share this post


Link to post
Share on other sites

Thanks for the help, unfortunately I still spawn in the water (southwest part of the map)

This is my full description.ext now:

//-------------------------------------------RESPAWN SETTINGS----------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

respawn = "BASE";
respawndelay = 1;
respawnDialog = 1;
respawnTemplatesWest[] = {"MenuPosition","MenuInventory"};
respawnTemplatesEast[] = {"MenuPosition","MenuInventory"};
respawnOnStart = 1;	
disabledAI = 1;
joinUnassigned = 1;
aiKills = 1;

#ifdef _PARAMTYPE
class Type
{
title = $STR_DISP_ARCGRP_TYPE; //--- ToDo: Localize
values[] = {0,1};
texts[] = {$STR_A3_CfgMPGameTypes_Coop_name_0,$STR_A3_CfgMPG ameTypes_DM_name_0}; //--- ToDo: Localize
default = 0;
isGlobal = 1;
file = "paramType.sqf";
};
#endif

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//-------------------------------------------GAMETYPE-----------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class Header
{
gameType = ZGM;
minPlayers = 1; 
maxPlayers = 8;
};

my init.sqf:

call compileFinal preprocessFileLineNumbers "FAR_revive\FAR_revive_init.sqf";

//-------------------------------------------Respawn inventory Loadout-----------------------------------------------------

[west, "B_soldier_SL_F"] call BIS_fnc_addRespawnInventory; ///Squad Leader
[west, "B_medic_F"] call BIS_fnc_addRespawnInventory; ///Combat Life Saver
[west, "B_soldier_LAT_F"] call BIS_fnc_addRespawnInventory; ///AT
[west, "B_soldier_AR_F"] call BIS_fnc_addRespawnInventory; ///Autorifleman
[west, "B_Soldier_F"] call BIS_fnc_addRespawnInventory; ///Rifleman
[west, "B_engineer_F"] call BIS_fnc_addRespawnInventory; ///Engineer
[west, "B_sniper_F"] call BIS_fnc_addRespawnInventory; ///Marksman
[west, "B_Helipilot_F"] call BIS_fnc_addRespawnInventory; ///Heli Pilot

And i created the paramType.sqf that you wrote.

In the editor i simply have the gameMaster module and a virtual zeus synced, along with some playable soldiers.

When i have respawnOnStart = 0; I get the correct position, but then the spawning of players won't work as intended.

Any idea what I'm doing wrong?

Share this post


Link to post
Share on other sites

Try linking a "Set Camera Position" module to your virtual Zeus.

Share this post


Link to post
Share on other sites

Thanks Caeden, While not really fixing the issue it does make it easy to move the camera back without having to travel manually.

Thanks!

btw: Is there a way to move the zeus camera by clicking the map?

Share this post


Link to post
Share on other sites

Middle mouse button is default.

I'm still confused as to why it isn't spawning you in the right place though. If your Zeus is spawning in the water, it will technically "drown" eventually.

*edit* is forced interface enabled on your Zeus's module?

*edit2* Just confirm, you have the "Game Master" gameplay modes module linked to the "Game Master" zeus module (with 'owner' set to the virtual zeus's name), and finally the virtual entity zeus with it's name identical to the 'owner of the "Game Master" zeus module?

*Edit3* Failing all of that, you could place this in the Virtual Zeus's init: this allowdamage false;

Edited by Caeden

Share this post


Link to post
Share on other sites

everything is set up as you say, what I meant with spawning at the water is that i spawn over open water, the very southwest edge of the map.

This is most likely due to respawning being messed somehow, it feels like it wants me to respawn but don't know where to put the logic, so it gets spawned at (0,0)

Share this post


Link to post
Share on other sites
everything is set up as you say, what I meant with spawning at the water is that i spawn over open water, the very southwest edge of the map.

This is most likely due to respawning being messed somehow, it feels like it wants me to respawn but don't know where to put the logic, so it gets spawned at (0,0)

My Description.ext looks like this and it works fine for me, maybe try this out:

// ----RESPAWN SETTINGS----

respawn = "Base";

respawnTemplatesWest[] = {"MenuPosition","MenuInventory"};

respawnTemplatesEast[] = {"MenuPosition","MenuInventory"};

respawndelay = 5;

respawnVehicleDelay = 30;

disabledAI = 1;

joinUnassigned = 1;

aiKills = 1;

enableDebugConsole = 1;

#ifdef _PARAMTYPE

class Type

{

title = $STR_DISP_ARCGRP_TYPE; //--- ToDo: Localize

values[] = {0,1};

texts[] = {$STR_A3_CfgMPGameTypes_Coop_name_0,$STR_A3_CfgMPGameTypes_DM_name_0}; //--- ToDo: Localize

default = 0;

isGlobal = 1;

file = "paramType.sqf";

};

#endif

// ----GAMETYPE----

class Header

{

gameType = ZGM;

minPlayers = 1;

maxPlayers = 32;

};

Share this post


Link to post
Share on other sites

Thank you! somehow it's working perfectly now! I cant see any real difference from before but at least it's working.

Maybe you could also help me get the units to show up in zeus mode?

I tried "master addCuratorEditableObjects [[unit],true];" and that works, but instead of having it in a loop I tried to

add it to the onPlayerRespawn.sqf, but it does not work (because it needs to be run on the server?) I tried setting it

up with BIS_fnc_MP as well but I must have done something wrong.

Any thoughts?

Share this post


Link to post
Share on other sites

Add this to your init:

//-------------------------------------------View-Units---------------------------------------------------------------------

while {true} do {

{

if (side _x == west) then

{

Curator addCuratorEditableObjects [[_x],true];

};

if (side _x == east) then

{

Curator addCuratorEditableObjects [[_x],true];

};

if (side _x == independent) then

{

Curator addCuratorEditableObjects [[_x],true];

};

if (side _x == civilian) then

{

Curator addCuratorEditableObjects [[_x],true];

};

}foreach allUnits;

};

Change Curator to your Zeus's name.

Glad it works now :)

Share this post


Link to post
Share on other sites

that is what I used before, I think I even found it from a post of yours in another thread.

I was just thinking if it could be done without having an infinite loop running? For example

using onPlayerRespawn.sqf since all players (and JiP?) will go through it both when connecting and respawning.

It seemed to work when I hardcoded the command to specific units, but I cant seem to get it functional when trying to

make it work like it should.

Any help here is greatly appreciated and if it's not possible then the above loop will do fine =)

Share this post


Link to post
Share on other sites

You could try using this (I haven't tested it) in your onPlayerRespawn.sqf. "initPlayerServer.sqf".

waituntil {player == player};

if (!isNull player) then

{

if (side _x == west) then

{

Curator addCuratorEditableObjects [[_x],true];

};

if (side _x == east) then

{

Curator addCuratorEditableObjects [[_x],true];

};

if (side _x == independent) then

{

Curator addCuratorEditableObjects [[_x],true];

};

if (side _x == civilian) then

{

Curator addCuratorEditableObjects [[_x],true];

};

}foreach allUnits;

};

I don't have any problems with the infinite loop. It's only adding things that aren't synced so it doesn't create any lag for me.

*EDIT*

I think using the "initPlayerServer.sqf" is the way to go, since it is "Executed only on server when a player joins mission (includes both mission start and JIP)"

Edited by Caeden

Share this post


Link to post
Share on other sites

that seems like a more efficient way, but don't you need something else as well?

I think it disappears upon death so something in the re-spawn file might be needed.

also do anyone know if playableUnits is still available? I tried using it instead of allUnits but then it stopped working.

Share this post


Link to post
Share on other sites

Hello I don't suppose either of you still follow this, however I made a post of an issue I was having and I used this. Don't suppose you could guide me in the right direction?

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  

×