Blockland Forums > Modification Help

Making a player unable to move?

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

otto-san:


--- Quote from: Iban on February 28, 2011, 07:53:11 PM ---I know it isn't, but Torque doesn't work that way.

You need to change the player's datablock to one that cannot move.

--- End quote ---
Right then.

I'm just trying to make a player have a sort of "sleep" mode where they can't move.

k thanks for the help guys

Iban:


--- Quote from: otto-san on February 28, 2011, 10:02:18 PM ---Right then.

I'm just trying to make a player have a sort of "sleep" mode where they can't move.

k thanks for the help guys

--- End quote ---
Woah! Epiphany. There is another way.

You know if you get smoked in ZAPT, your camera orbits your player but it can't move?

This is how.

--- Code: ---// Funct: Sets the client camera to orbit the %obj.
// Sends: void
function Armor::zombieCameraSpectate(%this, %obj)
{
if(isObject(%obj))
{
%client = %obj.client;

if(isObject(%client))
{
%transform = %obj.getTransform();
%client.camera.setOrbitMode(%obj, %transform, 0.5, 8, 8, 1);
%client.camera.mode = "Orbit";
%client.setControlObject(%client.camera);
}
}
}
--- End code ---

Return control to player.

--- Code: ---if(isObject(%client))
{
%client.setControlObject(%client.player);
}
--- End code ---

If you need any further detail of how this functions, just speak up.

Human Reaper:

Not that this is a bad or thing, or that you do not have the right or do not deserve to but you really love you ZAPT addon. Also that pretty cool way of doing it.

otto-san:

I remember when I had an epiphany like that.

thanks a bunch.  :cookieMonster:

question: What role does the variable %this play in that function? :o

Iban:


--- Quote from: Human Reaper on February 28, 2011, 10:43:37 PM ---Not that this is a bad or thing, or that you do not have the right or do not deserve to but you really love you ZAPT addon. Also that pretty cool way of doing it.

--- End quote ---
ZAPT packages almost every function a novice modder will need or want to package.
It contains dozens and dozens of really nifty tricks.

It's a resource.

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

Go to full version