Objects invisible to some, but not others?

Discuss all aspects related to modding Zandronum here.
Post Reply
Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

Objects invisible to some, but not others?

#1

Post by Krispy » Fri Apr 05, 2013 3:21 am

I'm making a mod that involves morphed players, and these morphed players spawn red circles that rise up from their feet to their heads. Sounds cool, right? In reality it gets kind of annoying for the person spawning them, so I was wondering if I could somehow make the sprites invisible to them. They have a unique class and TID.
Last edited by Krispy on Fri Apr 05, 2013 3:21 am, edited 1 time in total.

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: Objects invisible to some, but not others?

#2

Post by Torr Samaho » Sat Apr 06, 2013 7:15 pm

If these circles are just for the visuals you should be able to spawn them in a CLIENTSIDE script and prevent them from being spawned on the console player's machine by checking ConsolePlayerNumber(). This will break though when spying through the eyes of another player.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Objects invisible to some, but not others?

#3

Post by Krispy » Sun Apr 07, 2013 12:43 am

Well, spying is not allowed in this mod, so that won't be a problem :smile: . Now for this script you recommend: I was thinking of using something like this:

Code: Select all

script 69 enter clientside

{
     Spawn("RedSeekerHat", GetActorX(1), GetActorY(1), GetActorZ(1));
     delay (8);
     restart;
}
except with that ConsolePlayerNumber() check you mentioned. Could you show me how to use it? :allears:

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: Objects invisible to some, but not others?

#4

Post by Torr Samaho » Mon Apr 08, 2013 7:30 pm

Putting the content of your script into a "if ( PlayerNumber() != ConsolePlayerNumber() )" block should do the trick.

Krispy
 
Posts: 88
Joined: Tue Jun 05, 2012 9:37 pm
Location: Michigan

RE: Objects invisible to some, but not others?

#5

Post by Krispy » Mon Apr 08, 2013 8:19 pm

Thanks a lot.

Post Reply