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

Username:   Password: 
 RegisterRegister   
 AI Jump?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vassosman




PostPosted: Sun Jun 01, 2008 8:51 am   Post subject: AI Jump?

heres may game(gr.9 summative)
mario trying to get princess peach but bowser is jumping
problem ive used the code

Quote:
if posx > 150 and posy > 0 then %bowser jump
randint (posb, 60, 350)


but that just makes bowser go up and down like a maniac but i want him to jump up and down to variable heights
can you please help.

posx=marioX
posy=marioY
posb=bowserY

if you need any more info I would be glad to help you help me!
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Jun 01, 2008 1:11 pm   Post subject: RE:AI Jump?

the code snippet you posted would indeed be the problem. Try to explain what those 2 lines of code mean, in words, and you might see it too.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Insectoid




PostPosted: Sun Jun 01, 2008 1:44 pm   Post subject: RE:AI Jump?

Instead of using his y-value as the variable, try his y-velocity. Read the jumping tutorial.
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 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: