Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Physics and Jump with Lite-C!? #202112
04/13/08 13:00
04/13/08 13:00
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Hey

Well actually I tried half a dozen things to get gravity and jumping to work, but unfortunately I'm not able to get it to work.
I tried the script from the Kingdom Hearts Movement tutorial, but it doesn't work either, because of the missing "min" and "max" thing in Lite-C oÔ.
and somehow it's to difficult for me, cause I'm just a beginner in lite-c programming.

I tried things like:

 Code:
function gravity_handle()
{
	char_height = c_trace(vector(charakter.x, charakter.y, charakter.z), vector(charakter.x, charakter.y, charakter.z -4000), IGNORE_ME | IGNORE_PASSABLE | USE_BOX);
	while(char_height < charakter.z )
	{
		charakter.z += 4 * time_step;
		wait(1);
	}
	while(char_height > charakter.)
	{
		charakter.z -= 1 * time_step;
		wait(1);
	}
}


this is only one example.
Well I don't get it how to code it, that the entitys should fall faster, the deeper they fall oO. and how to add jumping in there.
everytime I tried to add jumping .. all was goin wrong ôo.
If I hit the space-key one time, the charakter just jumped a little.
and when i hold the space-key he'S stuck in the air Oo...

so please I hope someone could help me with this script

Roxas~

Re: Physics and Jump with Lite-C!? [Re: Roxas] #202115
04/13/08 13:29
04/13/08 13:29
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
 Code:
	height = c_trace(ilk,son,IGNORE_ME|IGNORE_PASSABLE|USE_BOX); 
		
		if (key_space){
			if (height < 2){
				height = 1;
				movement_vector.z = 12;
			}
		}
		
		if (height > 0){
			movement_vector.z-=3 * time_step;
			if (movement_vector.z < (height * -1)){
				movement_vector.z = height * -1;
			}
		}
		else{
			movement_vector.z = -1 * height;
		}


from, kingdom hearts movement tut.

Last edited by Quadraxas; 04/13/08 13:29.

3333333333
Re: Physics and Jump with Lite-C!? [Re: Quad] #202118
04/13/08 13:43
04/13/08 13:43
Joined: Oct 2005
Posts: 196
ambe Offline
Member
ambe  Offline
Member

Joined: Oct 2005
Posts: 196
is there no min max in lite-c? maxv? minv? maybe its because I have the full engine that this works for me.

Last edited by ambe; 04/13/08 13:44. Reason: sloppy writing

- code monkey
Re: Physics and Jump with Lite-C!? [Re: Roxas] #202144
04/13/08 17:00
04/13/08 17:00
Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
Roxas Offline OP
Member
Roxas  Offline OP
Member

Joined: Apr 2008
Posts: 144
Germany | Niedersachsen (Lower...
well, when I type in "min" in SED there's no command help for it.
and the "min" does not change his color to red either.

and if I type in "max" the command help appears but when i run the engine, i got the error that "max" is an "undeclared identifier" =O wtf does that mean?

is there anywhere a good and understandable and explained Tutorial for physics and jumping and movement?

The KH Tutorial isn't that easy to understand, and I can't get it to run because of the min and max thing oô.
the problem is that i'm german, > i understand english as you see, well, my english may not be the best...
and the things i don't get aren't well explained in that tutorial x_x or that complicated that i don't get it in english.
and the RUDI Workshop doesn't make sense to me, too.

Óò am I to stupid for scripting?? Q__Q.

Roxas~

Re: Physics and Jump with Lite-C!? [Re: Roxas] #202148
04/13/08 17:07
04/13/08 17:07
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
MIN and MAX don't exist in lite-C, so for getting a minimum and maximum use minv and maxv, they are in the manual. There were tutorials for physics in the AUM, but I think the KH tut is still the best for player movement.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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