Author Topic: Ski Player  (Read 869 times)

A Player that is forced onto skis when they spawn and can't get off.

workaround: make all bricks kill players on touch, the skis are a vehicle so it shouldn't trigger onPlayerTouch

actually yeah i'm kinda suprised that isn't a thing yet
workaround: make all bricks kill players on touch, the skis are a vehicle so it shouldn't trigger onPlayerTouch
that would be very difficult to do with a lot of bricks

It's a workaround, they're not always perfect.

It's a workaround, they're not always perfect.

Eventing every single brick is really gonna bloat the map's size.

It's a workaround, they're not always perfect.
It's a workaround for something that doesn't need a workaround.

By "all bricks" I meant "the floors of areas players should have to ski in," which I assume is modter?

yes but that is still a lot of bricks and it will be very difficult and time-consuming to do especially when you touch one you already evented by accident you'll die and possibly lose your place

basically it'd just be better for someone to make the add-on
« Last Edit: December 03, 2016, 08:07:59 PM by gr8dayseth »


Okay so I made this because it was easy, at the same time I'm an amateur coder so IDK if I've got the right idea but it does what it's supposed to do. Puts the players in Skis when they spawn, and doesn't allow them to get off. You'd have to change "PlayerStandardArmor" to the actual datablock of the Ski Player

Code: [Select]
package ForceSkisPlayerPackage
{

function gameConnection::spawnPlayer(%client)
{
Parent::spawnPlayer(%client);

%player = %client.player;


if(%player.dataBlock $= "PlayerStandardArmor")
{
%player.startSkiing();
}
}

function Armor::doDismount(%this, %obj, %forced) 
{

%player = %obj;

if(%player.dataBlock $= "PlayerStandardArmor")
{
return;
}
else
{
Parent::doDismount(%this, %obj, %forced);
}
}
};

activatePackage(ForceSkisPlayerPackage);

You'll still come off your skis if you hit something hard and tumble though. What do you want to happen in that instance? Just have the player die?