help!! help!! "Gravity problems" help!! help!!

Non-platform specific questions.

help!! help!! "Gravity problems" help!! help!!

Postby Fl3tch » Tue Jan 23, 2007 11:39 am

i have set gravity up using the tutorial on the ge program but i am still having a problem when my character is on a different platform to the floor. when trying to run off of the platform the gravity wont make me fall to the floor untill i have released the directional button that i am using, he will just glide across the air. obviously i would like him to fall immediately after leaving the edge of the platform no matter what direction i am moving and what button i am pressing (left or right).

anouther thing: when running along the floor i can not jump unless i stand still, i cant jump while running so this will prove a problem when i need to jump over a gap or hole in the floor. also if i try and move to the side after jumping on the spot i will not fall while goin that direction i will move in a straight line untill i let go.

please give me help as i need this problem solved to complete my game.
any help will be gratefull
thanks
fletch
Fl3tch
 
Posts: 11
Joined: Wed Jan 17, 2007 9:33 am
Score: 0 Give a positive score

Postby Fl3tch » Thu Jan 25, 2007 10:54 pm

does no1 know the answer!! lol

help please :)
Fl3tch
 
Posts: 11
Joined: Wed Jan 17, 2007 9:33 am
Score: 0 Give a positive score

Postby Game A Gogo » Fri Jan 26, 2007 12:30 am

well, could you send a the .ged and the data folder, i could help you^^
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Troodon » Fri Jan 26, 2007 9:52 pm

What's your xvelocity and yvelocity? Because if you go very quickly to x direction the y will effect less.
Game a gogo (or someone else who has the latest GE) will help you when you send the ged-file, but in the meantime try to make the fall accelerate.
For example
yvelocity = yvelocity + 1;

Then disable the moving in right and left when you don't touch the ground. For example with a variable called canMove.
When canMove is 0, you can't move and when it's 1 you can.
Collision any side of ground = canMove 1
end collision with ground = canMove 0

I hope this helped. :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Fl3tch » Sun Jan 28, 2007 11:23 pm

thankyou, i will give this a try and will get back to you to tell you how it goes.
thanks
Fl3tch
 
Posts: 11
Joined: Wed Jan 17, 2007 9:33 am
Score: 0 Give a positive score

Postby Fl3tch » Wed Jan 31, 2007 10:09 am

still having problems :(
i tried changing the x and y velocity like you said but that didnt make any noticeable difference. can you explain about the can move 1 and can move 0 im not to sure what you mean or where that should go.

does anyone have any other ideas? i cant still walk in mid air if i try and walk half way through a jump.

i am not using the actuall version of ge yet so i can not send the file, i am doing this for a course at college and my teacher hasnt purchased the program yet. This wouldnt be the reason would it?

would seem like a program with my coding but i have checked everything over several times and there is nothing wrong.( i set it up using ge gravity tutorial)

more help please!!
:shock: :? :(
Fl3tch
 
Posts: 11
Joined: Wed Jan 17, 2007 9:33 am
Score: 0 Give a positive score

Postby Fl3tch » Wed Jan 31, 2007 10:11 am

few typos there :/:/:/

"" can still walk in mid air if i try and walk half way through a jump. ""


"" would seem like a problem with my coding but i have checked everything over several times and there is nothing wrong.( i set it up using ge gravity tutorial) ""

thanks
Fl3tch
 
Posts: 11
Joined: Wed Jan 17, 2007 9:33 am
Score: 0 Give a positive score

Postby Troodon » Wed Jan 31, 2007 2:57 pm

Make a variable called canMove.
Write in the draw actor:
Code: Select all
if (canMove == 0)
{
EventDisable("Event Actor", EVENTKEYDOWN);
}

if (canMove == 1)
{
EventEnable("Event Actor", EVENTKEYDOWN);
}

Then write in collision finish with ground:
Code: Select all
canMove = 0;

And in collision any side of ground:
Code: Select all
canMove = 1;


I hope this helped.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby mr-game » Wed Jan 31, 2007 8:09 pm

just right click the character and go onto actor control then click the add event thing and pick draw actor
then pick script editor and put
yvelocity = yvelocity + .5;
and choose immediate action.
then that actor shoudl fall where ever u havnt put in on a platfrom with a physical responce hope this helped
hope im not like talking about somthign that none els here ways if i am sorry :)
erm hi
mr-game
 
Posts: 28
Joined: Mon Jan 29, 2007 10:32 pm
Location: my computer
Score: 1 Give a positive score

Postby Fl3tch » Fri Feb 02, 2007 9:30 am

cheers mr game, this is the same as the tutorial advice though, so it hasnt worked im afraid :(.

tekdino, i have tried this but it wont recognise the canmove (undeclared indetifier) am i doing something wrong. and also not tosure where to put the collison code u mentioned.

cheers
Fl3tch
 
Posts: 11
Joined: Wed Jan 17, 2007 9:33 am
Score: 0 Give a positive score

Postby Troodon » Fri Feb 02, 2007 2:39 pm

You should create the variable in the script editor. Click on the variables button. :)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Postby Westside Rep » Mon Mar 05, 2007 2:57 am

What if you want to STAY on the ground, never leaving it?
Just call me nub.
Westside Rep
 
Posts: 7
Joined: Sun Mar 04, 2007 10:40 pm
Score: 0 Give a positive score

Postby DilloDude » Mon Mar 05, 2007 5:12 am

It seems unusual that the sideways movement should disable the gravity. What code are you using for movement and gravity?
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Troodon » Mon Mar 05, 2007 6:16 pm

I think he means that the sideway movement doesn't disable the gravity. Only the falling disables sideway movement. (You can't move with feets when you don't touch the ground)
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest