jumppad

Posted By: Thickheaded

jumppad - 05/26/06 01:06

First things first, Thank you FOXHOUND for the code, all credits to you for helping me on this!!!!

This is my first contribution to the GS community, and though it is small I hope it helps someone who is looking for a jump_pad. My 9 yr old played with this for about 15 min and had a blast.

I know it ain't perfect so feel free to improve on it:

var jump_once;//var to make sure we only jump one time
function upupandaway()
{
if(jump_once){return;}//if we are jumping
jump_once = 1;//now we are jumping
var jump_force = 500;
var slow_down = .1;
while(jump_force > 1)//while we have some jump force left
{
c_move(player,vector(0,0,jump_force*time),nullvector,0);//up we go
jump_force -= slow_down;
slow_down += 1;//adjust this number to slow down this vaule
wait(1);
}
jump_once = 0;
return;
}

action jumppad
{
my.enable_impact=on;
my.event=upupandaway;
}
Posted By: in_christ

Re: jumppad - 05/26/06 18:36

hi , this code looks great, I have a question about it. I use A5 pro
5.20.0 and want to try this code and see if i want to use it. But I get
an error when I try to run my script.

ent_move(player,vector(0,0, jump_force*time),nullvector,0);//up we go
jump_pad.wdl 13:0 error: missing/wrong parameter comma unxpected

All i changed was c_move to ent_move because A5 doesn't use c_move.
Does anyone know how to make it work? Thanks for reading my post and for any
help.

var jump_once;//var to make sure we only jump one time
function upupandaway()
{
if(jump_once){return;}//if we are jumping
jump_once = 1;//now we are jumping
var jump_force = 500;
var slow_down = .1;
while(jump_force > 1)//while we have some jump force left
{
ent_move(player,vector(0,0, jump_force*time),nullvector,0);//up we go
jump_force -= slow_down;
slow_down += 1;//adjust this number to slow down this vaule
wait(1);
}
jump_once = 0;
return;
}

action jumppad
{
my.enable_impact=on;
my.event=upupandaway;
}
Posted By: Xarthor

Re: jumppad - 05/26/06 20:14

ent_move has a different number of parameters.
Also the *entity parameter (player in this case) does NOT exist in the ent_move instruction, so you would have to move the player in a different way.
you could set a certain skill or flag of the player and script the movement in the players own movement script.
© 2024 lite-C Forums