Author Topic: [Request] Playing custom player animations with customizable keys (+double jump)  (Read 1181 times)

I'm in need of two scripts.

1) Playing custom player animations with configurable keys. For example setting a key in the controls to play a kick animation.
Addendum: A client sided a script that adds a new line to the controls list in the options. For example a kick option that you could bind to K and when you are using my player type in-game and press K the kick animation plays.

2) Double jump. When you press the jump key the jump animation plays. If you press the jump key again within 500ms of pressing the jump key a double jump animation plays and you gain a velocity boost upwards. (I can do the velocity boost myself.)
Addendum: A script that detects that you have pressed the jump key in the last 500ms + you are currently in air. If true: play double jump animation. If false: do regular jump action.

I have a custom player model with custom animations I have made that uses a custom player type I created. I don't need anyone to create a model, animation, or a player type. None of this has anything to do with the default Blockhead player. I need a script.

« Last Edit: June 26, 2013, 08:51:28 AM by Demian »

I have interest in this thread.

Can't you look at the script of the TF2 scout pack's aluminum bat since it gives you the ability to double jump, rip the code from there and smooth it around on the edges so it will work standalone?

I don't know anything about scripting.

The second thing is really easy to do, all you need is the correct velocity boost of the regular jump

The first thing however, would require both a client and server mod. It's possible, sure, but everyone who joins your server will have to download a client to be able to do whatever.

It's possible, sure, but everyone who joins your server will have to download a client to be able to do whatever.
I can live with that. Can someone help me out with the first request? I might be able to do the second one on my own once the first one is done. Whoever decides to script it will of course get credit if I ever release the add-on.

The tf2 scout pack has a double jump playertype and a weapon that enables double jumping for any player.

The tf2 scout pack has a double jump playertype and a weapon that enables double jumping for any player.
Yeah I can copypaste that but I still need keybinds for custom animations.

But you're DEMIAN

Why can't you make these yourself?

But you're DEMIAN

Why can't you make these yourself?
I was never a good scripter. I can tweak a few lines here and there but I've never made anything from scratch.

2) Double jump. When you press the jump key the jump animation plays. If you press the jump key again within 500ms of pressing the jump key a double jump animation plays and you gain a velocity boost upwards.
Is the double jump animation a default animation? If so, which one? If it's a custom animation, what's it called?

How much velocity?

Do you want only a certain playertype to be able to double jump? Or every one?

Is the double jump animation a default animation? If so, which one? If it's a custom animation, what's it called?

How much velocity?

Do you want only a certain playertype to be able to double jump? Or every one?
Since there appears to be much confusion about my request I've modified the OP.

1) Playing custom player animations with configurable keys. For example setting a key in the controls to play a kick animation.
Addendum: A client sided a script that adds a new line to the controls list in the options. For example a kick option that you could bind to K and when you are using my player type in-game and press K the kick animation plays.
Code: (Client.cs) [Select]
function addBind(%division, %name, %command)
{
for(%i=0;%i<$remapCount;%i++)
{
if($remapDivision[%i] $= %division)
{
%foundDiv = 1;
continue;
}
if(%foundDiv && $remapDivision[%i] !$= "")
{
%position = %i;
break;
}
}
if(!%foundDiv)
{
error("Division not found: " @ %division);
return;
}
if(!%position)
{
$remapName[$remapCount] = %name;
$remapCmd[$remapCount] = %command;
$remapCount++;
return;
}
for(%i=$remapCount;%i>%position;%i--)
{
$remapDivision[%i] = $remapDivision[%i - 1];
$remapName[%i] = $remapName[%i - 1];
$remapCmd[%i] = $remapCmd[%i - 1];
}
$remapDivision[%position] = "";
$remapName[%position] = %name;
$remapCmd[%position] = %command;
$remapCount++;
}

addBind("Actions", "Kick", "doKick");

function doKick(%bool)
{
commandToServer('doKick', %bool);
}

Code: (Server.cs) [Select]
function serverCmdDoKick(%client, %bool)
{
if(!isObject(%client.player))
{
return;
}

if(%client.player.getDatablock().getName() $= "myPlayerData" && %bool)
{
%player.playThread(0, "kick");

//Do other kick stuff.
}
}