What is the problem you are having?
I can't figure out how to make the guy jump right
Describe what you have tried to solve this problem
i have tried different codes all have ended in disaster
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
i have tried this
Turing:
var PicFaceLeft, PicFaceRight :int
var x, y :int
x :=100
y :=100 var direction :int:=0 var chars :arraycharofboolean View.Set("offscreenonly")
PicFaceLeft :=Pic.FileNew("Person 1.jpg")
PicFaceRight :=Pic.FileNew("Person 2.jpg")
if direction =1then
x := x + 50 Pic.Draw(PicFaceRight, x, y, picMerge) elsif direction =2then
x := x - 50 Pic.Draw(PicFaceLeft, x, y, picMerge) endif View.Update delay(100)
y := y - 35 if direction =1then
Posted: Mon Dec 19, 2011 1:40 pm Post subject: Re: Need help with game
thanks i didn't know how t fix that but i need help on how to get the movement right
chipanpriest
Posted: Mon Dec 19, 2011 1:48 pm Post subject: RE:Need help with game
Whats wrong with the movement?
hojo12345
Posted: Mon Dec 19, 2011 1:57 pm Post subject: Re: Need help with game
i want the image to move like on the video
chipanpriest
Posted: Mon Dec 19, 2011 1:58 pm Post subject: RE:Need help with game
aha i cant see the video cause im at school :p
hojo12345
Posted: Mon Dec 19, 2011 2:02 pm Post subject: Re: Need help with game
you can't use Youtube at school i can
chipanpriest
Posted: Mon Dec 19, 2011 2:06 pm Post subject: RE:Need help with game
lol no :/ it sucks, i know
Sponsor Sponsor
hojo12345
Posted: Mon Dec 19, 2011 2:13 pm Post subject: Re: Need help with game
have you ever trying HTTPS
Dreadnought
Posted: Mon Dec 19, 2011 3:32 pm Post subject: Re: Need help with game
I'm not sure if this will fix your problem, but its the first thing that caught my eye.
You have something like this
Turing:
if condition1 then
elsif condition2 then
elsif condition3 then
endif
When condition1 is true do condition2 and condition3 matter?
If this was intended then I apologize for bringing this up.
hojo12345
Posted: Mon Dec 19, 2011 3:53 pm Post subject: Re: Need help with game
it's there to change my picture when i hit the left and right keys
Dreadnought
Posted: Mon Dec 19, 2011 7:08 pm Post subject: Re: Need help with game
Yes, but your code wont change the picture while jumping. And you can only jump straight up (no sideways motion while jumping). And since your asking how to "jump right"...
Velocity
Posted: Mon Dec 19, 2011 7:46 pm Post subject: RE:Need help with game
to jump right you want something like this
if KeyDown (RIGHT_ARROW_KEY) and keyDown ("Your jump key") then
x += 5 % how long you want to jump on the x scale
y += 5 % how high you want to jump on the y scale
x := x %make a new x coord for the previous command
y := y %make a new y coord for the previous command
end if
think about this in depth and you should get a solution in place.
RE : You must program the jump using a more enhanced program and implement the function use an open command.
if you dont want to do that then you can just make a key command for jump like i showed above without the "and" statement and then just press the right or left arrow key while you fall from your jump
or you can make seperate keys for jumping left and jump right and jumping up, and keys for just moving left, and right.
hojo12345
Posted: Tue Dec 20, 2011 7:40 am Post subject: Re: Need help with game
i meant jump correctly i wanted to know if there is a way i can get an image or shape to be able to jump like the guy in the video i posted above
tg851
Posted: Wed Dec 21, 2011 11:15 am Post subject: RE:Need help with game
i think he means the way the character itself moves when it jumps,arching over on the jump