Computer Science Canada

AI Jump?

Author:  vassosman [ 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!

Author:  Tony [ 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.

Author:  Insectoid [ 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.


: