Posted: Wed Dec 07, 2011 9:49 pm Post subject: Re: Graphics and jump
Now think about the boundaries section in your code.
Sponsor Sponsor
programmer1337
Posted: Wed Dec 07, 2011 9:58 pm Post subject: Re: Graphics and jump
can you give me a hint on what i should change please! lol
code:
if my < 300 and my > 200 and mx < 300 then
if mx > 300 then
GROUND_HEIGHT := 100
elsif mx < 300 then
GROUND_HEIGHT := 300
end if
end if
if my < 450 and my > 300 and mx > 600 then
GROUND_HEIGHT := 450
end if
if my > 100 then %boundaries
my := my - 6
elsif my < 93 then
my := 93
elsif my > 790 then
my := 790
elsif mx > 990 then
mx := 990
elsif mx < 10 then
mx := 10
end if
Insectoid
Posted: Wed Dec 07, 2011 10:04 pm Post subject: RE:Graphics and jump
If my > 100, will the program even test if my > 790, ever?
programmer1337
Posted: Thu Dec 08, 2011 7:59 am Post subject: Re: Graphics and jump
this is my current code and this is still the problem, when you jump on the platforms it will make you stay up there but it wont let you come down when you move off of them
code:
if my < 300 and my > 200 and mx < 300 then
if mx > 300 then
GROUND_HEIGHT := 100
elsif mx < 300 then
GROUND_HEIGHT := 300
end if
end if
if my < 450 and my > 300 and mx > 600 then
GROUND_HEIGHT := 450
end if
if my < 93 then
my := 93
elsif my > 790 then
my := 790
elsif mx > 990 then
mx := 990
elsif mx < 10 then
mx := 10
end if
programmer1337
Posted: Thu Dec 08, 2011 5:59 pm Post subject: RE:Graphics and jump