Page 1 of 1

Objects invisible to some, but not others?

Posted: Fri Apr 05, 2013 3:21 am
by Krispy
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.

RE: Objects invisible to some, but not others?

Posted: Sat Apr 06, 2013 7:15 pm
by Torr Samaho
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.

RE: Objects invisible to some, but not others?

Posted: Sun Apr 07, 2013 12:43 am
by Krispy
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:

RE: Objects invisible to some, but not others?

Posted: Mon Apr 08, 2013 7:30 pm
by Torr Samaho
Putting the content of your script into a "if ( PlayerNumber() != ConsolePlayerNumber() )" block should do the trick.

RE: Objects invisible to some, but not others?

Posted: Mon Apr 08, 2013 8:19 pm
by Krispy
Thanks a lot.