New account registration is temporarily disabled.

HOW DO I CHANGE MOVEMENT?

Posts

Pages: 1
Heya, I'm using RPG Maker XP and was wondering how I can get advanced movement? Not just horizontally and vertically. Like if I hold the Up and Left button it will go North-west.
Key input processing, conditional branches, and move events. For diagonal movement, turn "Through" on in a move event and move the hero up-right or whatever direction they have pressed. If you need an example i can give you one, I have it in one of my games. One catch though; I don't think that you can detect diagonal key presses. I only use this movement style for sideways stairs, and it is kicked off by an event that the player steps on.
Hmm well I'd like it to be permanent and not event triggered. Is it possible?

EDIT: Might as well put in another question.

If I make an event that shows text when I touch it, but I don't want it to show anymore the next time I touch it. What do I do?
I haven't tried, so I won't say that it's not, but the key would be to detect a diagonal key press. Also, if people are using the keyboard, it would be tougher. Your best bet is to check if two keys are pressed at once. I.e.,


@>Conditional Branch: Key[up] is pressed
@>Conditional Branch: Key[right] is pressed
:(Move Diagonally)


This is simplified, but that would be the general idea.
WIP
I'm not comfortable with any idea that can't be expressed in the form of men's jewelry
11363
NO. Do not use event coding. There is bound to be a script out there you can use.
The "use a switch" was meant to solve his second problem.
That event coding would work, but WIP is right there is a simple script out there for the 8-directional movement.

What you do is go into the script editor, and find the Game_Player script. Go to Line 214. You will see what looks like this:

      case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end

Just replace it with this...

      case Input.dir8
when 1
move_left
move_down
when 2
move_down
when 3
move_right
move_down
when 4
move_left
when 6
move_right
when 7
move_left
move_up
when 8
move_up
when 9
move_right
move_up
end

There you go all set.
author=Quiversee link=topic=971.msg13307#msg13307 date=1209217137
That event coding would work, but WIP is right there is a simple script out there for the 8-directional movement.

What you do is go into the script editor, and find the Game_Player script. Go to Line 214. You will see what looks like this:

      case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end

Just replace it with this...

      case Input.dir8
when 1
move_left
move_down
when 2
move_down
when 3
move_right
move_down
when 4
move_left
when 6
move_right
when 7
move_left
move_up
when 8
move_up
when 9
move_right
move_up
end

There you go all set.
Didn't work. Couldn't even start the game. ;(
But thanks anyway!
Goddamnit! Now I get an error when I try to test play it. Tried changing it back to what it was at first but it's not working. Help please!

Post your code so we can see where the syntax error is or copy the code from a working version and paste it over the broken stuff.
Yeah, you added or deleted something. Does that script phase the movement or does it just move,say, left and THEN up?
I posted the code in the same screenshot. It's in the bottom. And I tried copying but it didn't work. :S

and this error makes me unable to start the game and if I'm able to start it I can't move.
Post more, cause line 269 should have an end clause, not what it has, that should be the next line. Everything needs to move down as far as what is shown.
Scripting languages cannot always determine where exactly an error occurred. I forget what causes it, but sometimes an error on the last line just means that there was an error somewhere in the script, not necessarily on the last line (though it could be).
Scripting languages cannot always determine where exactly an error occurred. I forget what causes it, but sometimes an error on the last line just means that there was an error somewhere in the script, not necessarily on the last line (though it could be). You can always just get your hands on the default script and paste that back in.
Pages: 1