Blockland Forums > Modification Help

How do you client-sidedly...?

Pages: << < (2/3) > >>

Port:


--- Quote from: Lugnut1206 on February 04, 2012, 08:29:55 PM ---Is there a way to measure distance to an object by looking at it client sidedly?

--- End quote ---

getFocusDistance()

Lugnut:


--- Quote from: Slicksilver on February 05, 2012, 01:35:02 AM ---There is probably a better way to handle your client spawning than parenting a low level function, but I'm not about to go trace for it so here you are:

--- Code: ---package WhenISpawn {
function serverConnection::setControlObject(%this, %obj)
{
%return = parent::setControlObject(%this, %obj);
if(%obj.getClassname() $= "Player")
whenISpawn();
return %return;
}
};
activatePackage(WhenISpawn);

--- End code ---
Only issue is this will probably catch when you hit f7 as an admin. Too lazy to check for a better function.

--- End quote ---
I used handleYourSpawn() and it works perfectly..

Slicksilver:


--- Quote from: Lugnut1206 on February 05, 2012, 02:47:50 PM ---I used handleYourSpawn() and it works perfectly..

--- End quote ---
Oh, okay.

MegaScientifical:

function playGui::onWake(%this) {

That's what I use, at least in Age of Time. (So I could auto-login.) Less useful, doesn't directly say you spawned, but it happens when you begin to see so...

Chrono:

I don't think he means just first time spawning.

That would also get called whenever you look at PlayGui through the f10 window and when you close the f11 editor.

Pages: << < (2/3) > >>

Go to full version