Jump to content
Sign in to follow this  
amiscus

Re-spawned units do not show up for Zeus

Recommended Posts

Hello guys,

I've been working with Zeus a long time now, but recently we added the possibility to die! but after respawning Zeus does not see the unit marked with the icon above the name.

Can anyone tell me if there is a script that can help me with that?

Regards,

Amiscus

Share this post


Link to post
Share on other sites
Hello guys,

I've been working with Zeus a long time now, but recently we added the possibility to die! but after respawning Zeus does not see the unit marked with the icon above the name.

Can anyone tell me if there is a script that can help me with that?

Regards,

Amiscus

I had to use a couple event handlers to have this working:

// on server

"QS_respawnAddToCurator" addPublicVariableEventHandler {

if ((count allCurators) > 0) then {

{_x addCuratorEditableObjects [[((_this select 1) select 0)],TRUE];} count allCurators;

};

};

// on clients

player addEventHandler [

"Respawn",

{

QS_respawnAddToCurator = [player]; publicVariableServer "QS_respawnAddToCurator";

}

];

^ The server has to do the work, so you need to send the players new body as a variable to the server, for it to add. Trying to add stuff to Curator locally (from the client) will produce an error.

Share this post


Link to post
Share on other sites

I have a similar issue but its with vehicles, and it only occurs if the vehicle is deleted by curator instead of destroyed.

Share this post


Link to post
Share on other sites

This will probably solve all your problems

init.sqf

[color="#FF8040"][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isServer[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
[color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]spawn[/b][/color] 
[color="#8B3E2F"][b]{[/b][/color]
	[color="#191970"][b]while[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color]
		[color="#8B3E2F"][b]{[/b][/color]CURATOR_NAME [color="#191970"][b]addCuratorEditableObjects[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#191970"][b]vehicles[/b][/color][color="#8B3E2F"][b];[/b][/color]
		[color="#8B3E2F"][b]{[/b][/color]CURATOR_NAME [color="#191970"][b]addCuratorEditableObjects[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#191970"][b]allUnits[/b][/color][color="#8B3E2F"][b];[/b][/color]
		[color="#191970"][b]sleep[/b][/color] [color="#FF0000"]60[/color][color="#8B3E2F"][b];[/b][/color]
	[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color]

Made with KK's SQF to BBCode Converter

Edited by R3vo

Share this post


Link to post
Share on other sites
by server do you mean the init.sqf in the directory?

Yes, I do.

Share this post


Link to post
Share on other sites

I can't post my own threads yet since I'm new here but maybe someone can help me on this thread.

I'm having a similar issue, but the thing is I can't see my player marker while in Zeus and it doesn't appear in the units on the left, which means I can't tie an AI unit to my squad.

anyone know of a fix?

thanks

Share this post


Link to post
Share on other sites
I can't post my own threads yet since I'm new here but maybe someone can help me on this thread.

I'm having a similar issue, but the thing is I can't see my player marker while in Zeus and it doesn't appear in the units on the left, which means I can't tie an AI unit to my squad.

anyone know of a fix?

thanks

Dude, the solution is all over this thread. "addCuratorEditableObjects"

Share this post


Link to post
Share on other sites
This will probably solve all your problems

[color="#FF8040"][color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]isServer[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
[color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]spawn[/b][/color] 
[color="#8B3E2F"][b]{[/b][/color]
	[color="#191970"][b]while[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]do[/b][/color] [color="#8B3E2F"][b]{[/b][/color]
		[color="#8B3E2F"][b]{[/b][/color]CURATOR_NAME [color="#191970"][b]addCuratorEditableObjects[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b],[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#191970"][b]allUnits[/b][/color][color="#8B3E2F"][b];[/b][/color]  [...]
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color]

Made with KK's SQF to BBCode Converter

Is there an option to only add slotted players instead of allUnits? I have AI-guards patrolling that I don't want Zeus-editable.

Edited by Hypersteff
Missing Brace and quote edited

Share this post


Link to post
Share on other sites

Try to replace allUnits with allPlayers

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  

×