Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Double jump #344931
10/21/10 20:57
10/21/10 20:57
Joined: Aug 2010
Posts: 15
T
Totolia Offline OP
Newbie
Totolia  Offline OP
Newbie
T

Joined: Aug 2010
Posts: 15
I have this code and I happen to two problems.

I want to do that when you click once to jump, not when held down.

Code:
// Saltar
  	posicion = c_trace(me,vector(me.x, me.y, -1100),IGNORE_ME); 
if (key_space == 1 && posicion >= 0){
contador += time_step/16;
var velocidadsalto = (10) - (18*contador);
c_move(me, vector(0,0,velocidadsalto), NULL, GLIDE);
} else {
contador = 0;
c_move(me, vector(0,0,-10), NULL, GLIDE);
}



Then I would like to know how I can detect that I do a double jump. ie double key_space

Re: Double jump [Re: Totolia] #344934
10/21/10 21:26
10/21/10 21:26
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
Instead of

if(key_space == 1)...

use

if(key_hit("space"))...

You must include keys.c before, here is the description:

http://manual.3dgamestudio.net/keys_c.htm


Gamestudio download | 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