script call for event direction?

Started by diagostimo, June 16, 2012, 12:16:59 am

Previous topic - Next topic

diagostimo

hey, im trying to change the direction an event is facing depending on which way it is currently facing, through looking through the interpreter i found out how to change its direction, but i can find any method to check what direction it is curently facing, im trying to achieve this in the interpreter class under a new call: heres what i have so far:

class Interpreter
  def respawn_wait
    if $game_party.randomizer > 0
      character = get_character(0)
      if #character is facing down
        character.turn_left
      else
        character.turn_up
      end
      @wait_count = $game_party.randomizer
 
    end
  end
end

so ye i need to replace #character is facing down with something that checks the direction  :huh:

KK20

class Game_Character
  attr_accessor :direction
end

You should be able to handle it from there.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

diagostimo

Spoiler: ShowHide

i actually tried to set the direction using character.direction = 4 but when it threw an error i didnt think i could use it through the get_character method at all, but thanks changing it to an accessor makes it so i can set it to now :D