Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Graphics and jump
Index -> Programming, Turing -> Turing Help
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Dreadnought




PostPosted: Wed Dec 07, 2011 9:49 pm   Post subject: Re: Graphics and jump

Now think about the boundaries section in your code.
Sponsor
Sponsor
Sponsor
sponsor
programmer1337




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: Thu Dec 08, 2011 5:59 pm   Post subject: RE:Graphics and jump

i got it thanks guys Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 20 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: