I am making a platform game. (With your help, it will roll off the production line quickly)The jumping, moving, and dieing work. The only major problem is that the character, when moving, can just glide right through platforms. It is the only thing keeping me from posting this game. PLEASE HELP!
Offline
There are 3 methods you could use:
1. Make the Walls a different colour to the floor and everything else
forever if <key [right arrow v] pressed ?> change x by [5] if <touching color [#000000] ?> change x by [-5] end end if <key [left arrow v] pressed ?> change x by [-5] if <touching color [#000000] ?> change x by [5] end endMake 2 sprites representing walls. Call them "LeftWall" and "RightWall"
forever if <key [right arrow v] pressed ?> if <not <touching [RightWall v] ?>> change x by [5] end end if <key [left arrow v] pressed ?> if <not <touching [LeftWall v] ?>> change x by [-5] end end3. My favourite- colour the sides of the sprite two different colours
forever if <key [left arrow v] pressed ?> if <not <color [#FF0000] is touching [#000000] ?>> change x by [-5] end end if <key [right arrow v] pressed ?> if <not <color [#1900FF] is touching [#000000] ?>> change x by [5] end endthere is a chance that these may glitch a bit, in which case all you need to do is rearrange the scripts slightly.
Last edited by PhirripSyrrip (2012-06-03 07:45:47)
Offline