Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> + [ 1- Direction Movement Style ] +, * a.k.a. Resident Evil movement style~
woratana
post Jun 11 2008, 01:27 AM
Post #1


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




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~ laugh.gif


Screenshots
-No screenshot-


Script
Place it above main

CODE
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?


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
SojaBird
post Jun 11 2008, 01:43 AM
Post #2


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




Hey Wora, I tried it...But have no clue how ya could use this.
Also there're some buggies.

Ya can't copy past the script from codebox.
Also at line 64, change 'Input.press?(DOWN)' >to> 'Input.press?(SSM_DOWN)'

[Show/Hide] Working copy/past code including small fix

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


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
woratana
post Jun 11 2008, 01:52 AM
Post #3


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




Thanks for reporting the bug! biggrin.gif

btw, I put it in code before codebox, so I think you will be able to copy it. tongue.gif

You can enable this script by turn switch ON. smile.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
SojaBird
post Jun 11 2008, 02:41 AM
Post #4


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




yea cool, I've seen it...though I still don't know how this should work for anyone...haven't played Resident Evil you see biggrin.gif


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
Ibeatsephiroth
post Oct 25 2008, 11:53 AM
Post #5



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Skilled




Hmmm... I don't know how to use this... I keep getting this popup window that says: Script '1 Direction Movement' line 64: NameError occured. undefined method ` dash?' for class `Game_Player'

Why's this? And how do you use this script?
Go to the top of the page
 
+Quote Post
   
asdren
post Oct 25 2008, 12:49 PM
Post #6


Level 11
Group Icon

Group: Banned
Posts: 190
Type: Event Designer
RM Skill: Skilled




Yahoo a new wora script biggrin.gif
Seems interesting, but I don't need it...
But it is a very nice script biggrin.gif
@Ibeatsephiroth
do you hate rmxp.org too?
Go to the top of the page
 
+Quote Post
   
zolaga
post Oct 26 2008, 08:12 AM
Post #7


The Dazzler
Group Icon

Group: Revolutionary
Posts: 245
Type: Writer
RM Skill: Intermediate




Cool Wora I Have to check this out biggrin.gif


__________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clicking this link gives me $0.50
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Facebook Account - Timothy Rosenberg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Go to the top of the page
 
+Quote Post
   
onidsouza
post Dec 10 2008, 04:28 PM
Post #8


image master of doom
Group Icon

Group: Revolutionary
Posts: 603
Type: None
RM Skill: Undisclosed




Nice Script! it's very cool. i already played Resident Evil, it's very cool! I will not use this in my game cause i try it and i think it isn't very good with a ABS, but in another game maybe. Keep doing nice scripts like that woratana!


__________________________
Gabba Gabba Hey! enjoy your life ^^
lol (by keet's brother)
some lol
more lol
even MORE lol
Serious Discussion
why all my lol's have Teh Parakeet involved?

me ^^

bacon

Spamming is always better with bacon
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 12:35 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker