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
> Strafe Script Snippet
Xzygon
post Dec 20 2010, 06:04 PM
Post #1


Pineapple Inc's President and Creator of Duality Online
Group Icon

Group: Revolutionary
Posts: 554
Type: Writer
RM Skill: Skilled




Strafe Script Snippet

Author: Xzygon
Release Date: 12/20/10




Introduction
Hey, I'm Xzygon, and this is my first released Script Snippet. Basically, what this does, is, while you're holding down a certain
key, you "strafe", or move without changing directions. It was made mainly for ABS systems, so you could move back and forth around
a certain monster or run away while attacking.


Features
-Strafe.


Script
CODE
#===============================================================================
# [VX] Strafing Script Snippet
# Plug & Play
#-------------------------------------------------------------------------------
# by Xzygon [hisserdelema@hotmail.com]
# Credit: Vladislaus, for his VTP script, which I based this off of,
# and for his weapon strafing which will eventually be released.
#-------------------------------------------------------------------------------
# Basically, what this snippet does, is if you hold down a specific button,
# You can "strafe", or move without changing directions.
# Used best with ABS systems and ranged skills or weapons.
#-------------------------------------------------------------------------------
# This is practically my first snippet, so sorry if it's not compatible
# with other scripts. (It should be compatible with most)
#-------------------------------------------------------------------------------
# If you're going to use this, credit is not necessary, but it'd be nice.
# And yes, I know this section is longer than the actual snippet, but it's
# not actually used in gameplay, so it's fine.
#===============================================================================


Strafe_Key = Input::Z #Change this to whatever button you want to strafe.


class Game_Player < Game_Character
  
  alias xzy_move move_by_input
  def move_by_input
      if @actor != nil and (Input.press?(Strafe_Key))
      @old_dir_fix = @direction_fix if @old_dir_fix == nil
      @direction_fix = true
      else
      @direction_fix = @old_dir_fix if @old_dir_fix != nil
      @old_dir_fix = nil
    end
    xzy_move
  end
end



Customization
Change the button on line 22 to what button you want to press to strafe.


Compatibility
Should be compatible with most scripts.


Screenshot
Can't exactly take a screenshot of this.


Installation
Just Plug & Play. If you have an ABS system, such as VTP, put this script above


FAQ
Q: ZOMG IZ NOT WORKING!!@!?!
A: I can't exactly help you if you don't call down and give me more info.

Q: I'm using it with VTP or another battle system, but it's not working!
A: Put this script above VTP or other battle system, but below the Kernal/Keyboard. If that doesn't work, I don't know at this time.

Q: Wait, I have another question!
A: Just ask me below, or PM me.

Q: Can't you just event this?
A: Probably.


Terms and Conditions
Credits would be nice, but are not necessary.

Credits
-Xzygon
-Vladislaus, for his VTP script, which I based this off of.


__________________________
Check out my game, Duality Online!
Duality Online






Blah
A saying that I DID NOT STEAL FROM KUNG FU PANDA!
Today is a Gift.
That's why they call it the Present.
You never know what's inside,
Because the Present is always changing.
~Made it up with my cuz 7 Years Ago, without the help of anybody else~


Don't read!
00110000001100010011000000110000001100010011000000110000001100000011000000
11000100110001001100000011000000110000001100000011000100110000001100010011000100
1
10000001100010011000000110000001100000011000000110001001100010011000000110000001
1
00000011000000110001001100000011000000110001001100000011000100110001001100000011
0
00000110000001100000011000100110000001100000011000000110000001100000011000000110
0
01001100010011000000110000001100010011000000110001001100000011000100110001001100
0
10011000000110000001100000011000000110000001100010011000100110000001100010011000
0
00110000001100010011000000110001001100010011000000110000001100000011000100110001
0
01100000011000000110001001100000011000000110000001100000011000000110000001100010
0
11000100110000001100000011000100110001001100000011000000110001001100010011000000
1
10000001100000011000000110001001100000011000100110001001100000011000100110000001
1
00000011000100110000001100010011000100110000001100010011000100110000001100000011
0
00000110000001100010011000000110000001100000011000000110000001100000011000100110
0
01001100000011000000110001001100010011000000110000001100010011000100110000001100
0
10011000100110001001100010011000000110001001100010011000100110000001100000011000
1
00110000001100000011000000110001001100000011000000110000001100000011000000110000
0
01100010011000100110000001100000011000100110000001100000011000000110001001100010
0
11000000110001001100010011000100110001001100000011000100110001001100010011000000
1
10001001100000011000100110000001100010011000100110000001100000011000000110001001
1
00000011000000110001001100010011000000110001001100010011000000110000001100000011
0
00100110001001100000011000000110001001100000011000100110000001100000011000100110
0
00001100000011000000110000001100000011000000110001001100010011000000110000001100
0
10011000000110000001100000011000100110001001100000011000000110001001100000011000
1
00110000001100010011000100110000001100000011000000110001001100010011000000110001
0
01100010011000100110000001100000011000100110000001100000011000100110001001100010
0
11000100110000001100000011000100110000001100010011000100110001001100000011000000
1
10000001100000011000000110001001100010011000100110000001100010011000000110000001
1
00000011000100110001001100000011000100110000001100000011000100110000001100010011
0
00100110000001100010011000100110001001100000011000000110001001100010011000000110
0
00001100010011000100110001001100000011000000110001001100000011000000110000001100
0
00011000000110000001100010011000100110001001100000011000100110000001100000011000
0
00110001001100010011000000110001001100000011000000110000001100000011000100110001
0
01100000011000100110000001100000011000100110000001100010011000100110001001100000
0
11000000110001001100010011000000110000001100010011000000110000001100000011000000
1
10000001100000011000100110001001100000011000000110000001100010011000000110000001
1
00010011000100110000001100010011000000110000001100010011000000110001001100010011
0
00000110001001100010011000100110000001100000011000100110001001100000011000000110
0
00001100000011000100110000001100010011000100110001001100000011000000110001001100
0
00011000000110001001100010011000100110001001100000011000000110001001100000011000
0
00110001001100000011000000110000001100000011000000110000001100010011000100110000
0
01100000011000000110001001100010011000000110001001100010011000000110001001100010
0
11000100110001001100000011000100110001001100000011000000110001001100000011000000
1
10000001100010011000100110000001100000011000100110000001100010011000000110000001
1
00010011000000110001001100010011000100110000





I support
Supporting


Go to the top of the page
 
+Quote Post
   
The Angel of Dea...
post Dec 20 2010, 06:11 PM
Post #2


Level Lost Count at 9999999999999999999999
Group Icon

Group: Revolutionary
Posts: 348
Type: Developer
RM Skill: Advanced




Sounds good.
I'll try this out.


__________________________

Go to the top of the page
 
+Quote Post
   
lfcscouselad
post Jan 2 2011, 09:17 AM
Post #3


Level 2
Group Icon

Group: Member
Posts: 21
Type: Artist
RM Skill: Beginner




I'm trying to place this script in my game but not sure where it should be placed.
My game is using the requiem abs 8 script.
Ive tried placing it at the top of each of requiem scripts but keep getting syntax error message when testing game.
Sorry if this is a silly question as I'm pretty new to vx.
If any more information is needed to help me please let me know. Thank you.
Go to the top of the page
 
+Quote Post
   
Xzygon
post Jan 2 2011, 09:54 AM
Post #4


Pineapple Inc's President and Creator of Duality Online
Group Icon

Group: Revolutionary
Posts: 554
Type: Writer
RM Skill: Skilled




Not at the top of each requiem scripts. Put it below Kernel (Or Keyboard, if you have it.) Make sure it's above the battle system.

(For others; It works without the kernel, but for whatever reason, if you have it, it needs to be below.)


__________________________
Check out my game, Duality Online!
Duality Online






Blah
A saying that I DID NOT STEAL FROM KUNG FU PANDA!
Today is a Gift.
That's why they call it the Present.
You never know what's inside,
Because the Present is always changing.
~Made it up with my cuz 7 Years Ago, without the help of anybody else~


Don't read!
00110000001100010011000000110000001100010011000000110000001100000011000000
11000100110001001100000011000000110000001100000011000100110000001100010011000100
1
10000001100010011000000110000001100000011000000110001001100010011000000110000001
1
00000011000000110001001100000011000000110001001100000011000100110001001100000011
0
00000110000001100000011000100110000001100000011000000110000001100000011000000110
0
01001100010011000000110000001100010011000000110001001100000011000100110001001100
0
10011000000110000001100000011000000110000001100010011000100110000001100010011000
0
00110000001100010011000000110001001100010011000000110000001100000011000100110001
0
01100000011000000110001001100000011000000110000001100000011000000110000001100010
0
11000100110000001100000011000100110001001100000011000000110001001100010011000000
1
10000001100000011000000110001001100000011000100110001001100000011000100110000001
1
00000011000100110000001100010011000100110000001100010011000100110000001100000011
0
00000110000001100010011000000110000001100000011000000110000001100000011000100110
0
01001100000011000000110001001100010011000000110000001100010011000100110000001100
0
10011000100110001001100010011000000110001001100010011000100110000001100000011000
1
00110000001100000011000000110001001100000011000000110000001100000011000000110000
0
01100010011000100110000001100000011000100110000001100000011000000110001001100010
0
11000000110001001100010011000100110001001100000011000100110001001100010011000000
1
10001001100000011000100110000001100010011000100110000001100000011000000110001001
1
00000011000000110001001100010011000000110001001100010011000000110000001100000011
0
00100110001001100000011000000110001001100000011000100110000001100000011000100110
0
00001100000011000000110000001100000011000000110001001100010011000000110000001100
0
10011000000110000001100000011000100110001001100000011000000110001001100000011000
1
00110000001100010011000100110000001100000011000000110001001100010011000000110001
0
01100010011000100110000001100000011000100110000001100000011000100110001001100010
0
11000100110000001100000011000100110000001100010011000100110001001100000011000000
1
10000001100000011000000110001001100010011000100110000001100010011000000110000001
1
00000011000100110001001100000011000100110000001100000011000100110000001100010011
0
00100110000001100010011000100110001001100000011000000110001001100010011000000110
0
00001100010011000100110001001100000011000000110001001100000011000000110000001100
0
00011000000110000001100010011000100110001001100000011000100110000001100000011000
0
00110001001100010011000000110001001100000011000000110000001100000011000100110001
0
01100000011000100110000001100000011000100110000001100010011000100110001001100000
0
11000000110001001100010011000000110000001100010011000000110000001100000011000000
1
10000001100000011000100110001001100000011000000110000001100010011000000110000001
1
00010011000100110000001100010011000000110000001100010011000000110001001100010011
0
00000110001001100010011000100110000001100000011000100110001001100000011000000110
0
00001100000011000100110000001100010011000100110001001100000011000000110001001100
0
00011000000110001001100010011000100110001001100000011000000110001001100000011000
0
00110001001100000011000000110000001100000011000000110000001100010011000100110000
0
01100000011000000110001001100010011000000110001001100010011000000110001001100010
0
11000100110001001100000011000100110001001100000011000000110001001100000011000000
1
10000001100010011000100110000001100000011000100110000001100010011000000110000001
1
00010011000000110001001100010011000100110000





I support
Supporting


Go to the top of the page
 
+Quote Post
   
lfcscouselad
post Jan 2 2011, 10:34 AM
Post #5


Level 2
Group Icon

Group: Member
Posts: 21
Type: Artist
RM Skill: Beginner




Working perfect now. I had it in correct place but didn't realise it was D button on keyboard to use.

Thanks for your help and sorry for silly question.
Go to the top of the page
 
+Quote Post
   
Xzygon
post Jan 2 2011, 02:10 PM
Post #6


Pineapple Inc's President and Creator of Duality Online
Group Icon

Group: Revolutionary
Posts: 554
Type: Writer
RM Skill: Skilled




No problem. (Really? For me, it's C. Odd. It should be default, but myeh...)


__________________________
Check out my game, Duality Online!
Duality Online






Blah
A saying that I DID NOT STEAL FROM KUNG FU PANDA!
Today is a Gift.
That's why they call it the Present.
You never know what's inside,
Because the Present is always changing.
~Made it up with my cuz 7 Years Ago, without the help of anybody else~


Don't read!
00110000001100010011000000110000001100010011000000110000001100000011000000
11000100110001001100000011000000110000001100000011000100110000001100010011000100
1
10000001100010011000000110000001100000011000000110001001100010011000000110000001
1
00000011000000110001001100000011000000110001001100000011000100110001001100000011
0
00000110000001100000011000100110000001100000011000000110000001100000011000000110
0
01001100010011000000110000001100010011000000110001001100000011000100110001001100
0
10011000000110000001100000011000000110000001100010011000100110000001100010011000
0
00110000001100010011000000110001001100010011000000110000001100000011000100110001
0
01100000011000000110001001100000011000000110000001100000011000000110000001100010
0
11000100110000001100000011000100110001001100000011000000110001001100010011000000
1
10000001100000011000000110001001100000011000100110001001100000011000100110000001
1
00000011000100110000001100010011000100110000001100010011000100110000001100000011
0
00000110000001100010011000000110000001100000011000000110000001100000011000100110
0
01001100000011000000110001001100010011000000110000001100010011000100110000001100
0
10011000100110001001100010011000000110001001100010011000100110000001100000011000
1
00110000001100000011000000110001001100000011000000110000001100000011000000110000
0
01100010011000100110000001100000011000100110000001100000011000000110001001100010
0
11000000110001001100010011000100110001001100000011000100110001001100010011000000
1
10001001100000011000100110000001100010011000100110000001100000011000000110001001
1
00000011000000110001001100010011000000110001001100010011000000110000001100000011
0
00100110001001100000011000000110001001100000011000100110000001100000011000100110
0
00001100000011000000110000001100000011000000110001001100010011000000110000001100
0
10011000000110000001100000011000100110001001100000011000000110001001100000011000
1
00110000001100010011000100110000001100000011000000110001001100010011000000110001
0
01100010011000100110000001100000011000100110000001100000011000100110001001100010
0
11000100110000001100000011000100110000001100010011000100110001001100000011000000
1
10000001100000011000000110001001100010011000100110000001100010011000000110000001
1
00000011000100110001001100000011000100110000001100000011000100110000001100010011
0
00100110000001100010011000100110001001100000011000000110001001100010011000000110
0
00001100010011000100110001001100000011000000110001001100000011000000110000001100
0
00011000000110000001100010011000100110001001100000011000100110000001100000011000
0
00110001001100010011000000110001001100000011000000110000001100000011000100110001
0
01100000011000100110000001100000011000100110000001100010011000100110001001100000
0
11000000110001001100010011000000110000001100010011000000110000001100000011000000
1
10000001100000011000100110001001100000011000000110000001100010011000000110000001
1
00010011000100110000001100010011000000110000001100010011000000110001001100010011
0
00000110001001100010011000100110000001100000011000100110001001100000011000000110
0
00001100000011000100110000001100010011000100110001001100000011000000110001001100
0
00011000000110001001100010011000100110001001100000011000000110001001100000011000
0
00110001001100000011000000110000001100000011000000110000001100010011000100110000
0
01100000011000000110001001100010011000000110001001100010011000000110001001100010
0
11000100110001001100000011000100110001001100000011000000110001001100000011000000
1
10000001100010011000100110000001100000011000100110000001100010011000000110000001
1
00010011000000110001001100010011000100110000





I support
Supporting


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 - 05:13 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker