Advertisement
Guest User

RGSS3 - LockFix

a guest
Oct 6th, 2014
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.96 KB | None | 0 0
  1. #==============================================================================
  2. # ** Lock on event FIX
  3. #------------------------------------------------------------------------------
  4. # This Class was made to fix the "turn toward player" on event interaction
  5. #==============================================================================
  6.  
  7. $always_fix = false # Set to "true" if you want to "fix" all events
  8. $noturn = ["Animal","LockFix"] # Add "Characters" to fix
  9.  
  10.  
  11. class Game_Event < Game_Character
  12.  
  13.   #--------------------------------------------------------------------------
  14.   # * Override Lock Def
  15.   #--------------------------------------------------------------------------
  16.   def lock
  17.     unless @locked
  18.       @prelock_direction = @direction
  19.       #$game_variables[1] = @character_name //For debug purpone
  20.       if (!$always_fix) && (!$noturn.include?(@character_name)) then
  21.         turn_toward_player
  22.       end
  23.       @locked = true
  24.     end
  25.   end
  26.  
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement