Player Turning in Place before moving

Crydsch

Warper
Member
Joined
Jan 21, 2014
Messages
3
Reaction score
0
First Language
german
Primarily Uses
Hello everybody,

ich need a way to let the player turn in place before he moves to another coordinate.
I think there is no other way than doing it via a Script ... and all i found were VX or VX ACE Scripts which didn´t work in XP

My problem is, that i work on a harvest moon like game and if youre on a big field it´s really anoying that the charakter runs to next coordinate, even if you just wantet to turn around!

Therefore I need a Script that does exactly this.


Some Example´s:
1. If the charakter is facing up and the Player just presses the right arrow-key -> then the charakter should only turn right rather than move to the next right field

2. If the charakter is facing up and the Player hold down the right arrow-key -> then the charakter should move to the next right field and so on (as normally)

If out there is someone, who can help me or found a similar Script. I would be really thankfull...

In hope,

Crydsch
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,128
Reaction score
11,505
First Language
English
Primarily Uses
RMVXA
That script is for Ace, and he wants XP.
 

Bloodmorphed

Dungeon Fanatic
Veteran
Joined
Sep 17, 2012
Messages
1,466
Reaction score
144
First Language
English
Primarily Uses
Oh, so he does. Oops. lol
 

Crydsch

Warper
Member
Joined
Jan 21, 2014
Messages
3
Reaction score
0
First Language
german
Primarily Uses
Thanks for your fast replies, but as ksjp17 said these dont work in XP....
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
374
Reaction score
89
First Language
English
Primarily Uses
I took SirBilly's script and converted it to XP.

Code:
# Code by Mobius XVI# Based on SirBilly's Player Turn & Move script for VX Ace# Requested by Crydsch# Causes player to turn before movingclass Game_Player < Game_Character  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize    @wait_time = 0    super  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  # Alias old method  alias mobius_turn_step_update update  # Redefine update  def update    # Decrease wait time    @wait_time -= 1    # Remember whether or not moving in local variables    last_moving = moving?    # If moving, event running, move route forcing, and message window    # display are all not occurring    unless moving? or $game_system.map_interpreter.running? or           @move_route_forcing or $game_temp.message_window_showing      # Move player in the direction the directional button is being pressed      case Input.dir4      # When Down      when 2        if Input.trigger?(Input::DOWN) and self.direction == 2          move_down        elsif Input.trigger?(Input::DOWN)          @wait_time = 7         turn_down       elsif @wait_time <= 0         move_down       end      # When Left      when 4        if Input.trigger?(Input::LEFT) and self.direction == 4          move_left        elsif Input.trigger?(Input::LEFT)           @wait_time = 7          turn_left        elsif @wait_time <= 0          move_left        end      # When right      when 6        if Input.trigger?(Input::RIGHT) and self.direction == 6          move_right        elsif Input.trigger?(Input::RIGHT)          @wait_time = 7         turn_right       elsif @wait_time <= 0         move_right       end      # When Up      when 8        if Input.trigger?(Input::UP) and self.direction == 8          move_up        elsif Input.trigger?(Input::UP)          @wait_time = 7         turn_up       elsif @wait_time <= 0         move_up        end      end    end    # Remember coordinates in local variables    last_real_x = @real_x    last_real_y = @real_y    super    # If character moves down and is positioned lower than the center    # of the screen    if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y      # Scroll map down      $game_map.scroll_down(@real_y - last_real_y)    end    # If character moves left and is positioned more let on-screen than    # center    if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X      # Scroll map left      $game_map.scroll_left(last_real_x - @real_x)    end    # If character moves right and is positioned more right on-screen than    # center    if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X      # Scroll map right      $game_map.scroll_right(@real_x - last_real_x)    end    # If character moves up and is positioned higher than the center    # of the screen    if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y      # Scroll map up      $game_map.scroll_up(last_real_y - @real_y)    end    # If not moving    unless moving?      # If player was moving last time      if last_moving        # Event determinant is via touch of same position event        result = check_event_trigger_here([1,2])        # If event which started does not exist        if result == false          # Disregard if debug mode is ON and ctrl key was pressed          unless $DEBUG and Input.press?(Input::CTRL)            # Encounter countdown            if @encounter_count > 0              @encounter_count -= 1            end          end        end      end      # If C button was pressed      if Input.trigger?(Input::C)        # Same position and front event determinant        check_event_trigger_here([0])        check_event_trigger_there([0,1,2])      end    end  end  end # Class End
 

Crydsch

Warper
Member
Joined
Jan 21, 2014
Messages
3
Reaction score
0
First Language
german
Primarily Uses
Thank´s alot,

This Script works perfectly fine, just what i searched for :D

Thanks for that!

I´ll definetly credit you :)

Thankfully Crydsch
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The presentation pictures for FSM Castle Tiles are really bad, there is so much more content in this DLC than they show. Great DLC.^^
Anyone know/remember Mummy's Tomb / Crystals of Zong for C64? Trying to recreate it for One Map Challenge. Fun. And ... er ... challenging!


Listen.. I er... caught the live stream. :LZSwink:
The MZ first look stream was quite good. Looks like we get a lot of generator parts right off the bat this time around. Lots of cool clothes, helmets, facial marks, etc. Looking forward to playing around with it. :)
Any tips on how to share resources in here? Should I upload them in a image hosting site or Google Drive?

Forum statistics

Threads
100,821
Messages
979,952
Members
132,469
Latest member
baekyam3
Top