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;
}
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;
}