Charas-Project

Game Creation => Requests => Tutorials => Topic started by: Big Boo on October 28, 2007, 01:42:35 PM

Title: How do you make a diagnal movment
Post by: Big Boo on October 28, 2007, 01:42:35 PM
In my game Legacy I want there to be some neat systems. I know how to do the rest of theme. But not diagonal movement, please help.
Title:
Post by: Koopapooper on October 28, 2007, 01:47:36 PM
I was trying to do that once, I came up with nothing.Its probably possible though.
Title:
Post by: DragonBlaze on October 28, 2007, 10:21:39 PM
Its possible

make 3 parallel process events.

In the first put a conditional branch for if the left and right keys are pushed. If the left key is pushed, turn a switch
on, if not, turn it off. If the right key is pushed, turn a switch
on, if not, turn it off.

In the second event do the same thing, except do the up and down keys, be sure to use a differant variable for this one.

in the third event, make a bunch of conditional branches. In those branches have move event commands to move the hero.

For example, make a branch for if left is pushed, in that branch check if up is pushed, if it is, move the hero upleft, if not, check to see if down is pushed, if so, move the hero left down, if not, just move the hero left.

that'll work, but you'll have some problems cuz the hero wont trigger 'touched by hero' events while moving. Getting around this is complicated.
Title:
Post by: Big Boo on October 29, 2007, 12:58:12 PM
thanks alot