Author Topic: Question about control objects  (Read 1572 times)

I'm not able to test this myself, so I figured this was the next best thing.

I was wondering if having multiple clients having their control object set to a single PathCamera object would cause issues.  In the past, I messed around with this kind of thing using players and remember a distinct issue that gave the same effect as having your control object deleted, though I was not experienced enough (nor did I experiment enough) to determine if this was a direct result of having a second client controlling it, or if something happened that I can't remember which removed the player object.  I've never done much experimentation with control objects to be honest, and it seems like this would be one of the first things someone would try.

A player/camera can only have one client controlling it - setting a second client to control it will remove it from the first one

Thank you.  I'll leave this unlocked in case anyone has anything else to add.

Probably try making more PathCameras. Starting at the same direction and position and path that it should go.

You can have multiple clients on a single PathCamera.

Code: (Gamemode_Slayer/Modules/FlyThroughCam.cs) [Select]
function Slayer_MinigameSO::startFlyThrough(%this,%startRound)
{
%this.flyCam.startRound = %startRound;

%pause = 50;

%this.flyCam.testClient = "";
%this.flyCam.setPosition(0.0);
%this.flyCam.setTarget(%this.flyCam.numNodes);
%this.flyCam.setState("stop");

for(%i = 0; %i < %this.numMembers; %i ++)
{
%cl = %this.member[%i];
%cl.flyCam_lastControlObject = %cl.getControlObject();
%cl.schedule(%i * %pause,setControlObject,%this.flyCam);
}

%time = (%this.numMembers - 1) * %pause;
%time = getMin(%time, 10000); //wait no more than 10 seconds

%this.flyCam.schedule(%time,setState,"forward");

%displayTime = %time / 1000;
if(%displayTime >= 1)
%this.bottomPrintAll("<just:center>\c5Preparing fly-through camera.",%displayTime,1);
}
« Last Edit: January 19, 2014, 11:48:33 AM by Greek2me »

Code: (Gamemode_Slayer/Modules/FlyThroughCam.cs) [Select]
%time = Slayer_Support::mRestrict(%time,0,10000); //wait no more than 10 seconds

What's wrong with mClamp?

What's wrong with mClamp?

Not sure why he isn't using it there, but mClamp doesn't work with floats, but yet getMin and getMax do..

Not sure why he isn't using it there, but mClamp doesn't work with floats, but yet getMin and getMax do..

mClampF..?

I'm not sure why. This was written a while ago, and I really need to go back and rewrite a lot of the legacy code. Anyway, it's been changed to getMin.

mClampF..?
I'm 90% sure that isn't default, checking now..

I am an idiot. Its default (or at least I have it).

I'm 90% sure that isn't default, checking now..

I am an idiot. Its default (or at least I have it).
Pretty sure it's been in the TGE documentation for a while now

Err, it's actually Badspot's own creation.


TIL there's an e(); function that saves a lot of time.

Err, it's actually Badspot's own creation.
You're right. What I had originally thought was documentation was actually just a default add-on that used mClampF

TIL there's an e(); function that saves a lot of time.
what