1-Direction Movement
#1
1-Direction Movement Style
Version 1.0
by Woratana
Release Date: 10/06/2008


Introduction
This is the alt. movement style for shooting game.
Player will turn left/right by press Left/Right,
and walk forward/backward by press Up/Down.

This movement style will allow player to turn and shoot around without
move from spot he is standing~

Enjoy~ :lol:


Screenshots
-No screenshot-


Script
Place it above main
[Image: 25thhqt.jpg]
Code:
#===============================================================
# ? [VX] ? 1-Direction Movement Style ? ?
# * a.k.a. Resident Evil Movement Style~ *
#--------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released on: 10/06/2008
# ? Version: 1.0
#--------------------------------------------------------------
# ? Feature:
# Change the way to move player to...
# press UP: Move forward
# press DOWN: Move backward
# press LEFT: Turn Left
# press RIGHT: Turn Right
#--------------------------------------------------------------
# ? How to use:
# Put this script above main, you can setup script below
#=================================================================
class Game_Player < Game_Character

#========================================================
# SETUP SCRIPT: Configure Player's Control Buttons Here~
# These buttons will apply to default move system too.
#--------------------------------------------------------
SSM_UP = Input::UP
SSM_DOWN = Input::DOWN
SSM_LEFT = Input::LEFT
SSM_RIGHT = Input::RIGHT
#------------------------------------------
SSM_DASH_BACKWARD = false # Allow player to run backward? (true/false)
SSM_CONTROL_SWITCH_ID = 9 # Switch to turn 1-dir movement system ON
#=========================================================

def move_by_input
return unless movable?
return if $game_map.interpreter.running?

if $game_switches[SSM_CONTROL_SWITCH_ID] # If control switch is ON
# Shooting style movement
if Input.repeat?(SSM_LEFT)
turn_left_90
elsif Input.repeat?(SSM_RIGHT)
turn_right_90
elsif Input.press?(SSM_DOWN)
move_backward
elsif Input.press?(SSM_UP)
move_forward
end
else
# Default movement
if Input.press?(SSM_LEFT)
move_left
elsif Input.press?(SSM_RIGHT)
move_right
elsif Input.press?(SSM_DOWN)
move_down
elsif Input.press?(SSM_UP)
move_up
end
end
end

alias wor_gampla_onedirmov_dash dash?
def dash?
return false if $game_switches[SSM_CONTROL_SWITCH_ID] and
Input.press?(SSM_DOWN) and
!SSM_DASH_BACKWARD
wor_gampla_onedirmov_dash
end
end
Instruction
Place the script above main.
You can setup script in setup part if you don't want to recover all
HP/MP/states when level up.


Author's Notes
Free for use in your work if credit is included.


Bug Report?
Please give me these informations:
Quote:- What is it says in error window?
- When is it get error? (Right after run game, when you choose
something, etc.)
- Do you have any other scripts running in your game that may crash with
this script?
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Drago Pixel Movement LiTTleDRAgo 0 140 07-08-2017, 12:12 PM
Last Post: LiTTleDRAgo
   DoubleX RMVXA Diagonal Movement DoubleX 0 4,659 08-15-2015, 02:13 PM
Last Post: DoubleX
   DoubleX RMVXA Pixel Movement DoubleX 1 6,195 08-15-2015, 04:51 AM
Last Post: DoubleX
   WASD Movement Helladen 2 8,513 02-27-2014, 05:10 AM
Last Post: Helladen
   Advanced Movement 1.2 Helladen 1 5,612 01-25-2014, 02:25 AM
Last Post: Helladen
   Victor Engine - Pixel Movement Victor Sant 0 5,383 06-29-2012, 08:43 PM
Last Post: Victor Sant
   Victor Engine - Diagonal Movement Victor Sant 0 4,693 12-23-2011, 10:31 PM
Last Post: Victor Sant
   Extra Movement Frames Stone 0 5,564 03-08-2008, 05:02 AM
Last Post: Stone
   8-Directional Movement with Sprite Support Kylock 0 8,904 03-07-2008, 07:06 PM
Last Post: Kylock



Users browsing this thread: 2 Guest(s)