LOGIN
SEARCH
PROFILE
keys: ↑ ↓
LOGOUT
INDEX
MEMBERS
keys: ↑ ↓
HOME
PORTAL
PLAY ALONG
PLAY with WORDS
PLAY with GRAPHICS
PLAY with SOUNDS
PLAY with CODES
PLAY with PROJECTS
keys: ← →
Guest Access
Register:
Members:



View previous topic View next topic Go down Message [Page 1 of 1]

Administrator
Administrator
#1 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
Hey U GUYZ!
Check out these two scripts Hackel made for XAS!

XAS 8-WAY!
copy and paste under ADD-ON in script database (F9)

Spoiler:
Code:
# XAS 8-way directional shooting
# by Hackel


class Game_Character
  def move_lower_left
turn_lower_left
    if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or
      (passable?(@x, @y, 4) and passable?(@x - 1, @y, 2))
      @x -= 1
      @y += 1
      increase_steps
    end
  end
  #--------------------------------------------------------------------------
  # * Move Lower Right
  #--------------------------------------------------------------------------
  def move_lower_right
turn_lower_right
    if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or
      (passable?(@x, @y, 6) and passable?(@x + 1, @y, 2))
      @x += 1
      @y += 1
      increase_steps
    end
  end
  #--------------------------------------------------------------------------
  # * Move Upper Left
  #--------------------------------------------------------------------------
  def move_upper_left
turn_upper_left
    if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or
      (passable?(@x, @y, 4) and passable?(@x - 1, @y, 8))
      @x -= 1
      @y -= 1
      increase_steps
    end
  end
  #--------------------------------------------------------------------------
  # * Move Upper Right
  #--------------------------------------------------------------------------
  def move_upper_right
turn_upper_right
    if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or
      (passable?(@x, @y, 6) and passable?(@x + 1, @y, 8))
      @x += 1
      @y -= 1
      increase_steps
    end
  end
 
def turn_lower_left
unless @direction_fix
@direction = 3
@stop_count = 0
end
end

def turn_lower_right
unless @direction_fix
@direction = 7
@stop_count = 0
end
end

def turn_upper_left
unless @direction_fix
@direction = 5
@stop_count = 0
end
end

def turn_upper_right
unless @direction_fix
@direction = 9
@stop_count = 0
end
end


  #--------------------------------------------------------------------------
  # * 1 Step Forward
  #--------------------------------------------------------------------------
  def move_forward
    case @direction
    when 2
      move_down(false)
    when 3
      move_lower_left
    when 4
      move_left(false)
    when 5
      move_upper_left
    when 6
      move_right(false)
    when 7
      move_lower_right
    when 8
      move_up(false)
    when 9
      move_upper_right
    end
  end
  def turn_right_90
    case @direction
    when 2
      turn_left
    when 3#lower left
      turn_upper_left
    when 4
      turn_up
    when 5#upper left
    turn_upper_right
    when 6
      turn_down
    when 7#lower right
      turn_lower_left
    when 8
      turn_right
    when 9#upper right
      turn_lower_right
    end
  end
  #--------------------------------------------------------------------------
  # * Turn 90° Left
  #--------------------------------------------------------------------------
  def turn_left_90
    case @direction
    when 2#down
      turn_right
    when 3#lower left
      turn_lower_right
    when 4#left
      turn_down
    when 5#upper left
    turn_lower_left
    when 6#right
      turn_up
    when 7#lower right
      turn_upper_right
    when 8#up
      turn_left
    when 9#upper right
      turn_upper_left
    end
  end
  #--------------------------------------------------------------------------
  # * Turn 180°
  #--------------------------------------------------------------------------
  def turn_180
    case @direction
    when 2
      turn_up
    when 3#lower left
      turn_upper_right
    when 4
      turn_right
    when 5#upper left
    turn_lower_right
    when 6
      turn_left
    when 7#lower right
      turn_upper_left
    when 8
      turn_down
    when 9#upper right
      turn_lower_left
    end
  end

  #--------------------------------------------------------------------------
  # * Turn at Random
  #--------------------------------------------------------------------------
  def turn_random
    case rand(8)
    when 0
      turn_up
    when 1
      turn_right
    when 2
      turn_left
    when 3
      turn_down
    when 4
    turn_upper_left
    when 5
    turn_lower_right
    when 6
    turn_upper_right
    when 7
    turn_lower_left

    end
  end
end

class Game_Player < Game_Character
 
def conf_move
  actor = $game_party.actors[0]
if @actor == nil
return false
end   
  if  actor.states.include?(XAS::CONFUSE_ID)
      if Input.press?(Input::UP) and Input.press?(Input::RIGHT)
        turn_lower_left
      elsif Input.press?(Input::UP) and Input.press?(Input::LEFT)
        turn_lower_right
      elsif Input.press?(Input::RIGHT) and Input.press?(Input::DOWN)
        turn_upper_left
      elsif Input.press?(Input::LEFT) and Input.press?(Input::DOWN)
        turn_upper_right
      elsif Input.press?(Input::UP)
      turn_down
      elsif Input.press?(Input::DOWN)
      turn_up
      elsif Input.press?(Input::RIGHT)
      turn_left
      elsif Input.press?(Input::LEFT)
      turn_right
      end       
    else
      if Input.press?(Input::UP) and Input.press?(Input::RIGHT)
      turn_upper_right
      elsif Input.press?(Input::UP) and Input.press?(Input::LEFT)
      turn_upper_left
      elsif Input.press?(Input::RIGHT) and Input.press?(Input::DOWN)
      turn_lower_right
      elsif Input.press?(Input::LEFT) and Input.press?(Input::DOWN)
      turn_lower_left
      elsif Input.press?(Input::UP)
      turn_up
      elsif Input.press?(Input::DOWN)
      turn_down
      elsif Input.press?(Input::RIGHT)
      turn_right
      elsif Input.press?(Input::LEFT)
      turn_left
      end
  end
 end
end
#-----------------------------diagnol graphic
class Game_Character
  #--------------------------------------------------------------------------
  # * Move Lower Left
  #--------------------------------------------------------------------------
  def move_lower_left
    # If no direction fix
    unless @direction_fix
      # Face down is facing right or up
      @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
      diagonal_graphic
    end
    # When a down to left or a left to down course is passable
    if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or
      (passable?(@x, @y, 4) and passable?(@x - 1, @y, 2))
      # Update coordinates
      @x -= 1
      @y += 1
      # Increase steps
      increase_steps
    end
  end
  #--------------------------------------------------------------------------
  # * Move Lower Right
  #--------------------------------------------------------------------------
  def move_lower_right
    # If no direction fix
    unless @direction_fix
      # Face right if facing left, and face down if facing up
      @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
      diagonal_graphic
    end
    # When a down to right or a right to down course is passable
    if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or
      (passable?(@x, @y, 6) and passable?(@x + 1, @y, 2))
      # Update coordinates
      @x += 1
      @y += 1
      # Increase steps
      increase_steps
    end
  end
  #--------------------------------------------------------------------------
  # * Move Upper Left
  #--------------------------------------------------------------------------
  def move_upper_left
    # If no direction fix
    unless @direction_fix
      # Face left if facing right, and face up if facing down
      @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
      diagonal_graphic
    end
    # When an up to left or a left to up course is passable
    if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or
      (passable?(@x, @y, 4) and passable?(@x - 1, @y, 8))
      # Update coordinates
      @x -= 1
      @y -= 1
      # Increase steps
      increase_steps
    end
  end
  #--------------------------------------------------------------------------
  # * Move Upper Right
  #--------------------------------------------------------------------------
  def move_upper_right
    # If no direction fix
    unless @direction_fix
      # Face right if facing left, and face up if facing down
      @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
      diagonal_graphic
    end
    # When an up to right or a right to up course is passable
    if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or
      (passable?(@x, @y, 6) and passable?(@x + 1, @y, 8))
      # Update coordinates
      @x += 1
      @y -= 1
      # Increase steps
      increase_steps
    end
  end
 
def dir8_exist?
  begin
  RPG::Cache.character(@character_name_orginal + "_D", @character_hue)
  rescue
  return false
  end
  return true
end
def diagonal_graphic
  if @character_name_orginal == nil
    @character_name_orginal  = @character_name
  elsif @direction % 2 != 0
    return unless dir8_exist?
        @character_name = (@character_name_orginal + "_D")
      else
        return unless dir8_exist?
      @character_name = @character_name_orginal
    end
  end
 
def turn_down
    unless @direction_fix
      @direction = 2
      diagonal_graphic
      @stop_count = 0
    end
  end
  def turn_left
    unless @direction_fix
      @direction = 4
      diagonal_graphic
      @stop_count = 0
    end
  end
  def turn_right
    unless @direction_fix
      @direction = 6
      diagonal_graphic
      @stop_count = 0
    end
  end
  def turn_up
    unless @direction_fix
      @direction = 8
      diagonal_graphic
      @stop_count = 0
    end
  end
 
def turn_lower_left
unless @direction_fix
@direction = 3
diagonal_graphic
@stop_count = 0
end
end

def turn_lower_right
unless @direction_fix
@direction = 7
diagonal_graphic
@stop_count = 0
end
end

def turn_upper_left
unless @direction_fix
@direction = 5
diagonal_graphic
@stop_count = 0
end
end

def turn_upper_right
unless @direction_fix
@direction = 9
diagonal_graphic
@stop_count = 0
end
end

  def turn_toward_player
    # Get difference in player coordinates
    sx = @x - $game_player.x
    sy = @y - $game_player.y
    # If coordinates are equal
    if sx == 0 and sy == 0
      return
    end
    distol = (@x - $game_player.x).abs + (@y - $game_player.y).abs
    distol /= 3
    if (sx - sy).abs <= 0 + distol
      sx > 0 ? turn_upper_left : turn_lower_right
    elsif (sx + sy).abs <= 0 + distol
      sx > 0 ? turn_lower_left : turn_upper_right
    # If horizontal distance is longer
    elsif sx.abs > sy.abs
      # Turn to the right or left towards player
      sx > 0 ? turn_left : turn_right
    # If vertical distance is longer
    else
      # Turn up or down towards player
      sy > 0 ? turn_up : turn_down
    end
  end
 
 
  #--------------------------------------------------------------------------
  # * Turn Towards Event
  #--------------------------------------------------------------------------
  def turn_toward_event(id)
    # Get difference in player coordinates
    return if $game_map.events[id] == nil
    sx = @x - $game_map.events[id].x
    sy = @y - $game_map.events[id].y
    # If coordinates are equal
    if sx == 0 and sy == 0
      return
    end
    distol = (@x - $game_map.events[id].x).abs + (@y - $game_map.events[id].y).abs
    distol /= 3
    if (sx - sy).abs <= 0 + distol
      sx > 0 ? turn_upper_left : turn_lower_right
    elsif (sx + sy).abs <= 0 + distol
      sx > 0 ? turn_lower_left : turn_upper_right
    # If horizontal distance is longer
    elsif sx.abs > sy.abs
      # Turn to the right or left towards player
      sx > 0 ? turn_left : turn_right
    # If vertical distance is longer
    else
      # Turn up or down towards player
      sy > 0 ? turn_up : turn_down
    end
  end
 
 
 
 
    def turn_away_from_event(id)
    # Get difference in player coordinates
    return if $game_map.events[id] == nil
    sx = @x - $game_map.events[id].x
    sy = @y - $game_map.events[id].y
    # If coordinates are equal
    if sx == 0 and sy == 0
      return
    end
    distol = (@x - $game_map.events[id].x).abs + (@y - $game_map.events[id].y).abs
    distol /= 3
    if (sx - sy).abs <= 0 + distol
      sx > 0 ? turn_lower_right : turn_upper_left
    elsif (sx + sy).abs <= 0 + distol
      sx > 0 ? turn_upper_right : turn_lower_left
    # If horizontal distance is longer
    elsif sx.abs > sy.abs
      # Turn to the right or left away from player
      sx > 0 ? turn_right : turn_left
    # If vertical distance is longer
    else
      # Turn up or down away from player
      sy > 0 ? turn_down : turn_up
    end
  end


  #--------------------------------------------------------------------------
  # * Turn Away from Player
  #--------------------------------------------------------------------------
  def turn_away_from_player
    # Get difference in player coordinates
    sx = @x - $game_player.x
    sy = @y - $game_player.y
    # If coordinates are equal
    if sx == 0 and sy == 0
      return
    end
    distol = (@x - $game_player.x).abs + (@y - $game_player.y).abs
    distol /= 3
    if (sx - sy).abs <= 0 + distol
      sx > 0 ? turn_lower_right : turn_upper_left
    elsif (sx + sy).abs <= 0 + distol
      sx > 0 ? turn_upper_right : turn_lower_left
    # If horizontal distance is longer
    elsif sx.abs > sy.abs
      # Turn to the right or left away from player
      sx > 0 ? turn_right : turn_left
    # If vertical distance is longer
    else
      # Turn up or down away from player
      sy > 0 ? turn_down : turn_up
    end
  end
def passable?(x, y, d)
  if d % 2 != 0
  case d
    when 3
    new_x = x + 1
    new_y = y - 1
    when 5
    new_x = x + 1
    new_y = y + 1
    when 7
    new_x = x - 1
    new_y = y - 1
    when 9
    new_x = x - 1
    new_y = y + 1
    end
    else
    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    end
unless $game_map.valid?(new_x, new_y)
return false
end
if @through
return true
end
unless $game_map.passable?(x, y, d, self)
return false
end
unless $game_map.passable?(new_x, new_y, 10 - d)
return false
end
for event in $game_map.events.values
if event.x == new_x and event.y == new_y
unless event.through or event.character_name == ""
if event.character_name != ""
return false
end
end
end
end
if $game_player.x == new_x and $game_player.y == new_y
unless $game_player.through
if @character_name != ""
return false
end
end
end
return true
end
 
 
 def move_backward
    # Remember direction fix situation
    last_direction_fix = @direction_fix
    # Force directino fix
    @direction_fix = true
    # Branch by direction
    case @direction
    when 2
      move_up(false)
    when 3
      move_upper_right
    when 4
      move_right(false)
    when 5
      move_lower_right
    when 6
      move_left(false)
    when 7
      move_upper_left
    when 8
      move_down(false)
    when 9
      move_lower_left
    end
    # Return direction fix situation back to normal
    @direction_fix = last_direction_fix
  end
  #--------------------------------------------------------------------------
  # * 1 Step Forward
  #--------------------------------------------------------------------------
  def move_forward
    case @direction
    when 2
      move_down(false)
    when 3
      move_lower_left
    when 4
      move_left(false)
    when 5
      move_upper_left
    when 6
      move_right(false)
    when 7
      move_lower_right
    when 8
      move_up(false)
    when 9
      move_upper_right
    end
        diagonal_graphic
  end
  def turn_right_90
    case @direction
    when 2
      turn_left
    when 3#lower left
      turn_upper_left
    when 4
      turn_up
    when 5#upper left
    turn_upper_right
    when 6
      turn_down
    when 7#lower right
      turn_lower_left
    when 8
      turn_right
    when 9#upper right
      turn_lower_right
    end
  end
  #--------------------------------------------------------------------------
  # * Turn 90° Left
  #--------------------------------------------------------------------------
  def  turn_4
      case @direction
    when 3#lower left
      turn_down
    when 5#upper left
    turn_left
    when 7#lower right
      turn_right
    when 9#upper right
      turn_up
    end
  end
  def turn_left_90
    case @direction
    when 2#down
      turn_right
    when 3#lower left
      turn_lower_right
    when 4#left
      turn_down
    when 5#upper left
    turn_lower_left
    when 6#right
      turn_up
    when 7#lower right
      turn_upper_right
    when 8#up
      turn_left
    when 9#upper right
      turn_upper_left
    end
  end
  #--------------------------------------------------------------------------
  # * Turn 180°
  #--------------------------------------------------------------------------
  def turn_180
    case @direction
    when 2
      turn_up
    when 3#lower left
      turn_upper_right
    when 4
      turn_right
    when 5#upper left
    turn_lower_right
    when 6
      turn_left
    when 7#lower right
      turn_upper_left
    when 8
      turn_down
    when 9#upper right
      turn_lower_left
    end
  end

  #--------------------------------------------------------------------------
  # * Turn at Random
  #--------------------------------------------------------------------------
  def turn_random
    case rand(8)
    when 0
      turn_up
    when 1
      turn_right
    when 2
      turn_left
    when 3
      turn_down
    when 4
    turn_upper_left
    when 5
    turn_lower_right
    when 6
    turn_upper_right
    when 7
    turn_lower_left

    end
  end
end

class Game_Player < Game_Character
 
def conf_move
  actor = $game_party.actors[0]
if @actor == nil
return false
end   
  if  actor.states.include?(XAS::CONFUSE_ID)
      if Input.press?(Input::UP) and Input.press?(Input::RIGHT)
        turn_lower_left
      elsif Input.press?(Input::UP) and Input.press?(Input::LEFT)
        turn_lower_right
      elsif Input.press?(Input::RIGHT) and Input.press?(Input::DOWN)
        turn_upper_left
      elsif Input.press?(Input::LEFT) and Input.press?(Input::DOWN)
        turn_upper_right
      elsif Input.press?(Input::UP)
      turn_down
      elsif Input.press?(Input::DOWN)
      turn_up
      elsif Input.press?(Input::RIGHT)
      turn_left
      elsif Input.press?(Input::LEFT)
      turn_right
      end       
    else
      if Input.press?(Input::UP) and Input.press?(Input::RIGHT)
      turn_upper_right
      elsif Input.press?(Input::UP) and Input.press?(Input::LEFT)
      turn_upper_left
      elsif Input.press?(Input::RIGHT) and Input.press?(Input::DOWN)
      turn_lower_right
      elsif Input.press?(Input::LEFT) and Input.press?(Input::DOWN)
      turn_lower_left
      elsif Input.press?(Input::UP)
      turn_up
      elsif Input.press?(Input::DOWN)
      turn_down
      elsif Input.press?(Input::RIGHT)
      turn_right
      elsif Input.press?(Input::LEFT)
      turn_left
      end
  end
 end
 end

Now the hero can fire diagonally AND instead of rotating the sprites, just have the diagonal graphic for each tool named with a "_D"

here's an example:
Spoiler:

S_Fire01_D
[You must be registered and logged in to see this image.]



XAS 8-WAY TERRAIN! copy and paste under ADD-ON in script database (F9)

Spoiler:
Code:
# XAS 8-WAY TERRAIN
# by Hackel

module XAS_ACTION
  TERRAIN_TAG = 1
  SELF_SWITCH = "B"
  STOP        = []
  TURN180    =[3]
  BOUNCELEFT    =[]
  BOUNCERIGHT  =[]
  TERRAIN_TAG2 = 2
  SELF_SWITCH2 = "B"
  STOP2        = []
  TURN1802    =[]
  BOUNCELEFT2    =[]
  BOUNCERIGHT2  =[3]
  TERRAIN_TAG3 = 3
  SELF_SWITCH3 = "B"
  STOP3        = []
  TURN1803    =[]
  BOUNCELEFT3    =[3]
  BOUNCERIGHT3  =[]
def check_event_trigger_attack()
    if @action.nil? or @action.attack_id == 0
      return
    end
    if @ox == nil
    @ox = self.x
    @oy = self.y
  end
      if @d == nil
      @d = @direction
    end
    if @turn == true
          diagonal_graphic
      @direction = @d
      end
  unless @ox == self.x and @oy == self.y
        @ox = self.x
    @oy = self.y
 
    if $game_map.terrain_tag(@ox, @oy) == TERRAIN_TAG
 
    unless SELF_SWITCH == 0
    key = [$game_map.map_id, self.id, SELF_SWITCH]
    $game_self_switches[key] = true
    $game_map.need_refresh = true if $game_map.need_refresh == false
  end
    if STOP.include?(@action.attack_id)
          @move_type = 0
        end
        if TURN180.include?(@action.attack_id)
          @direction = (@d-10).abs
          @d = @direction
          @turn = true
      elsif BOUNCELEFT.include?(@action.attack_id)
          case @d
    when 2
      @direction = 6
    when 4
      @direction = 8
    when 6
      @direction = 2
    when 8
      @direction = 4
    end
        diagonal_graphic
    @d = @direction
    @turn = true
    elsif BOUNCERIGHT.include?(@action.attack_id)
          case @d
    when 2
      @direction = 4
    when 4
      @direction = 2
    when 6
      @direction = 8
    when 8
      @direction = 6
    end
    @d = @direction
    @turn = true
    elsif OLDDIR.include?(@action.attack_id)
    @turn = true#@direction = @d
    end
  elsif $game_map.terrain_tag(@ox, @oy) == TERRAIN_TAG2
      if @d == nil
      @d = @direction
    end
    unless SELF_SWITCH2 == 0
    key = [$game_map.map_id, self.id, SELF_SWITCH2]
    $game_self_switches[key] = true
    $game_map.need_refresh = true if $game_map.need_refresh == false
    end
    if STOP2.include?(@action.attack_id)
          @move_type = 0
        end
        if TURN1802.include?(@action.attack_id)
          @direction = (@d-10).abs
          @d = @direction
          @turn = true
    elsif BOUNCELEFT2.include?(@action.attack_id)
          case @d
    when 2
      @direction = 6
    when 4
      @direction = 8
    when 6
      @direction = 2
    when 8
      @direction = 4
    end
    @d = @direction
        diagonal_graphic
    @turn = true
    elsif BOUNCERIGHT2.include?(@action.attack_id)
          case @d
    when 2
      @direction = 4
    when 4
      @direction = 2
    when 6
      @direction = 8
    when 8
      @direction = 6
    end
    @d = @direction
        diagonal_graphic
    @turn = true
  elsif OLDDIR2.include?(@action.attack_id)
    @turn = true#@direction = @d
    end
    elsif $game_map.terrain_tag(@ox, @oy) == TERRAIN_TAG3
      if @d == nil
      @d = @direction
    end
    unless SELF_SWITCH3 == 0
    key = [$game_map.map_id, self.id, SELF_SWITCH3]
    $game_self_switches[key] = true
    $game_map.need_refresh = true if $game_map.need_refresh == false
    end
    if STOP3.include?(@action.attack_id)
          @move_type = 0
        end
        if TURN1803.include?(@action.attack_id)
          @direction = (@d-10).abs
          @d = @direction
          @turn = true
    elsif BOUNCELEFT3.include?(@action.attack_id)
          case @d
    when 2
      @direction = 6
    when 4
      @direction = 8
    when 6
      @direction = 2
    when 8
      @direction = 4
    end
    @d = @direction
        diagonal_graphic
    @turn = true
    elsif BOUNCERIGHT3.include?(@action.attack_id)
          case @d
    when 2
      @direction = 4
    when 4
      @direction = 2
    when 6
      @direction = 8
    when 8
      @direction = 6
    end
    @d = @direction
        diagonal_graphic
    @turn = true
  elsif OLDDIR3.include?(@action.attack_id)
    @turn = true#@direction = @d
    end
  end
  end
    hit_check = false
    range = @action.attack_range
    hit = []
    if @action.user.is_a?(Game_Event) and
      @action.player_damage == true
    targets = $game_map.events.values
    else
    targets = [$game_player] + (@action.player_damage ? [] : $game_map.events.values)
    end
    for event in targets
      next if event == self  or
              @action.hit_events.include?(event) or event.erased
      body_size      = event.body_size
      event_center_x = event.x
      event_center_y = event.y - body_size
      dx = event_center_x - self.x
      dy = event_center_y - self.y
      dx = (dx >= 0 ? [dx - body_size, 0].max : [dx + body_size, 0].min)
      dy = (dy >= 0 ? [dy - body_size, 0].max : [dy + body_size, 0].min)
      case @action.attack_range_type
      when Map::RHOMBUS
        hit_check = (dx.abs + dy.abs <= range)
      when Map::SQUARE
        hit_check = (dx.abs <= range and dy.abs <= range)
      when Map::LINE
        case self.direction
        when 3
          hit_check = ((-dx - dy).abs < 1 and dy >= 0 and dy <= range / 2**0.5)
        when 5
          hit_check = ((-dx + dy).abs < 1 and dy <= 0 and dy >= -range / 2**0.5)
        when 7
          hit_check = ((-dx + dy).abs < 1 and dy >= 0 and dy <= range / 2**0.5)
        when 9
          hit_check = ((-dx - dy).abs < 1 and dx >= 0 and dx <= range / 2**0.5)
        when 2
          hit_check = (dx.abs <= 1 and dy >= 0 and dy <= range)
        when 8
          hit_check = (dx.abs <= 1 and dy <= 0 and dy >= -range)
        when 6
          hit_check = (dy.abs <= 1 and dx >= 0 and dx <= range)
        when 4
          hit_check = (dy.abs <= 1 and dx <= 0 and dx >= -range)
        end
      end
      hit.push(event) if hit_check
      hit_check = false
      end
    for event in hit
      if event.action_effect(self, self.action.attack_id)
      hit_check = true
    end
    if @action.multi_hit == false
        @action.hit_events.push(event)   
    end   
    end
    if hit_check
      $game_temp.active_token = self
    end
  end
end

to avoid any errors, make certain to edit your
XAS - Tool Effect
search for this line to read
Code:
dirset    = [1,2,3,4,5,6,7,8,9]#bug fix


if you're not familiar with the amazing bullet terrain script
click on the face [You must be registered and logged in to see this link.]

don't thank me, thank HACKEL! Very Happy
Administrator
Show Signature
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Tutorial Wizardmaster
Tutorial Wizardmaster
#2 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

calvin624

calvin624
Tutorial Wizardmaster
Tutorial Wizardmaster
Tutorial Wizardmaster
profile
Hey everyone, I installed the updated version of the Terrain script and I keep on getting the error "Script 'TERRAIN' line 99: NameError Occurred. uninitialized constant XAS_ACTION::OLDDIR" - I dunno if it's something I'm doing incorrectly or what.

Anyone have an idea?
Tutorial Wizardmaster
Show Signature
Tutorial Wizardmaster
http://xasabs.com
Administrator
Administrator
#3 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
@calvin - in the script data base do cntrl+shift+"F"

search for "XAS_ACTION::OLDDIR" (without the quotes)

under what script is this CONSTANT under?
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
Tutorial Wizardmaster
Tutorial Wizardmaster
#4 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

calvin624

calvin624
Tutorial Wizardmaster
Tutorial Wizardmaster
Tutorial Wizardmaster
profile
Can't seem to find it anywhere in v3.7 :/

Tutorial Wizardmaster
Show Signature
Tutorial Wizardmaster
http://xasabs.com
Administrator
Administrator
#5 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
if you want, PM me your project so I can look at it.

if you are unable to find this CONSTANT in the Terrain script line 99,
(according to the error message)
would it be possible that there's a line of code in an event?

Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
EVENTALIST

mr_wiggles

mr_wiggles
EVENTALIST
 EVENTALIST
EVENTALIST
profile
Well gface, the constant that its looking for is not in the script you posted.
EVENTALIST
Show Signature
EVENTALIST
Tutorial Wizardmaster
Tutorial Wizardmaster
#7 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

calvin624

calvin624
Tutorial Wizardmaster
Tutorial Wizardmaster
Tutorial Wizardmaster
profile
Yeah sure I was going to upload it anyway. Just going to tidy it up a little Smile
Tutorial Wizardmaster
Show Signature
Tutorial Wizardmaster
http://xasabs.com
Active Member
Active Member
#8 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

unrivaledneo

unrivaledneo
Active Member
Active Member
Active Member
profile
Nice work, havnt tested it yet but im sure it good as always will let ya know if i find any bugs. WIth this, XAS becoming a great shoot em up :p now if only i can make a realistic shotgun n machine gun :p
Active Member
Show Signature
Active Member
||||||||||
||||||||||
#9 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

supercow

supercow
||||||||||
||||||||||
profile
cheers its amazing, very nice script indeed Smile
spell and atk diagonal works, but is there a way that the sprite (look) diagonal too? Smile
if so this would be awesome Razz
XAS RULE cheers cheers cheers
||||||||||
Show Signature
||||||||||
Administrator
Administrator
#10 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
^updated!

Thanks again to Hackel! Newer version of the 8-way script!

Diagonal graphics appear if named with a "_D"
see example in original post

^,^
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
||||||||||
||||||||||
#11 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

supercow

supercow
||||||||||
||||||||||
profile
woohooo what an amazing adition cheers
hackel to the rescue Razz
now all i need is the diagonal pict for all neccesary spell Razz
btw, i dont know if this the place to ask, its about
dirset = [1,2,3,4,5,6,7,8,9]
before it was dirset = [1,2,3,4,6,7,8,9]
can i ask what is the [5] for? stationery ?
sorry if i ask too much Crying or Very sad
||||||||||
Show Signature
||||||||||
Administrator
Administrator
#12 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
[5] is actually for "up_right" when using the 8-way script.
XAS wasn't 8-way ready so this is the work around.

ask away ~ ^,^

Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
||||||||||
||||||||||
#13 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

supercow

supercow
||||||||||
||||||||||
profile
thx Wink
can i ask again what does :

elsif OLDDIR.include?(@action.attack_id)

in [8 way terrain] do?
i was thinking might be cool if i can use it to bounce magic around,but
got an error when im using too much magic Razz but sometimes it doesnt error....dunno y
||||||||||
Show Signature
||||||||||
Administrator
Administrator
#14 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
that line of code says "or do the "OLDDIR" settings when a tool is being used) - hope that helps :-P

what is your error message when you use too much magic?

download Hackel's demo for the bullet terrain script to see how you can bounce your magic around.
just click on the face [You must be registered and logged in to see this link.]
Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch
||||||||||
||||||||||
#15 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

supercow

supercow
||||||||||
||||||||||
profile
that ninja was so cool !!! Shocked
made me think of dragon ball Laughing all their atk can destroy mountain/building

i did try again btw....but the error doesnt come out now Rolling Eyes weird...
ill try again later when had time Smile thx gameface

if i delete the 8 way terrain ,will there be any problem? Neutral
||||||||||
Show Signature
||||||||||
Administrator
Administrator
#16 RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN Empty Re: RMXP + XAS (3.82 and lower) = 8WAY Shooting & TERRAIN
Loading

G@MeF@Ce

G@MeF@Ce
Administrator
Administrator
Administrator
profile
keep the 8-way terrain if you plan on using 8-way shooting and you want to bounce your magic around.

then study how the events were made in the demo and you should be good ^,^



Administrator
Show Signature


Hey Guest, check out my demos!
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]
[You must be registered and logged in to see this link.]




G101's theme colors
[You must be registered and logged in to see this image.]
[You must be registered and logged in to see this link.]

[You must be registered and logged in to see this image.]


shhh.... [You must be registered and logged in to see this link.]



[You must be registered and logged in to see this link.]
Administrator
https://www.dropbox.com/sh/i47rig99qhrvn8s/4m5HvsM2fD http://g4m3f4c3.deviantart.com https://www.facebook.com//pages/Gameface101/332331300127008 https://twitter.com//mr_gameface101 https://soundcloud.com/schurr https://www.youtube.com/user/MrGameface101?feature=watch

Sponsored content

profile

View previous topic View next topic Back to top Message [Page 1 of 1]

 

Chatbox system disabled
Personal messaging disabled