spiderwes wrote:
OK, so i started my new game, but have problems with creating gravity, water, etc.
PLEASE HELP!
Realistic water is incredibly hard, but gravity is easy, it really depends on what you need. what kind of project is it
Last edited by zammer990 (2012-08-12 10:49:52)
Offline
spiderwes wrote:
it's a platform game, like mario
If that's the case, then you probably want velocities ,and if you just want the character to slow down in water, not for the water to move, then you should use a colour sensor
when gf clicked forever if <key [right arrow v] pressed?> //for all the movement keys change [xvel v] by (1) end if <key [up arrow v] pressed?> set [yvel v] to (7) end if <not<touching color (ground colour)?>> if <(yvel) < (1)> change [yvel v] by (-1) else set [yvel v] to ((yvel) * (0.87)) end if <touching color (ground colour)?> set [yvel v] to (0) end if <touching color (water colour)?> set [maxspeed v] to (2) else set [msxpreed v] to (3) end if <(xvel) > (maxspeed)> set [xvel v] to (maxpeed) end change x by (xvel) change y by (yvel) set [xvel v] to ((xvel) * (0.87))this doesn't allow swimming. but gives you the basics
Offline
spiderwes wrote:
how do i make it so my sprite can only go so high when jumping?
Use a variable "jumping" and have it so when you jump, it sets jumping to 1, and have it so you cant jump while jumping is 1, have jumping reset when you hit the ground
Offline
spiderwes wrote:
ok where do i put that?
if <key [up arrow v] pressed?> if <(jumping) = (0)> set [yvel v] to (7) set [jumping v] to (1) end end if <touching color (ground color)?> set [jumping v] to (0)
Last edited by zammer990 (2012-08-12 19:07:50)
Offline