Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 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
   Enhanced Squad Movement DerVVulfman 5 5,113 02-24-2023, 04:40 PM
Last Post: DerVVulfman
   Drago Pixel Movement LiTTleDRAgo 1 5,198 07-08-2017, 12:12 PM
Last Post: LiTTleDRAgo
   Eight Direction & More Frames DerVVulfman 42 76,590 06-29-2016, 05:06 AM
Last Post: LunarBerry
   DoubleX RMVXA Diagonal Movement DoubleX 0 4,099 08-15-2015, 02:13 PM
Last Post: DoubleX
   DoubleX RMVXA Pixel Movement DoubleX 1 5,475 08-15-2015, 04:51 AM
Last Post: DoubleX
   WASD Movement Helladen 2 7,610 02-27-2014, 05:10 AM
Last Post: Helladen
   Advanced Movement 1.2 Helladen 1 5,033 01-25-2014, 02:25 AM
Last Post: Helladen
   Victor Engine - Pixel Movement Victor Sant 0 4,857 06-29-2012, 08:43 PM
Last Post: Victor Sant
   Victor Engine - Diagonal Movement Victor Sant 0 4,169 12-23-2011, 10:31 PM
Last Post: Victor Sant
   Moghunter's Advanced Movement System Helel 1 7,463 12-08-2009, 11:52 PM
Last Post: explocion200



Users browsing this thread: