Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
jumppad #75583
05/26/06 01:06
05/26/06 01:06
Joined: Sep 2005
Posts: 80
Missouri, USA
T
Thickheaded Offline OP
Junior Member
Thickheaded  Offline OP
Junior Member
T

Joined: Sep 2005
Posts: 80
Missouri, USA
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;
}


It's expensive bein stupid...
Re: jumppad [Re: Thickheaded] #75584
05/26/06 18:36
05/26/06 18:36
Joined: Aug 2003
Posts: 293
indiana
in_christ Offline
Member
in_christ  Offline
Member

Joined: Aug 2003
Posts: 293
indiana
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;
}


JESUS LOVES YOU!!!
Re: jumppad [Re: in_christ] #75585
05/26/06 20:14
05/26/06 20:14
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
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.


Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1