melikeyrpg
Member
Hi, I am using the latest version of GTBS with RMXP. I keep getting an error when some of my enemies move. It says "No Method error occured. Undefined method for nil_class". Here is the part in the script it directs me to. I put a * next to the line in question the error message tells me:
def find_move_position(move, move_positions, routes)
# ok, so we want to now find the best movable position for the character.
# first thing to check is if they can move, if not return their current position.
# otherwise, we need to determine if they can attack their 'attack position'
# without moving. So we will need to generate the attack grid to see if they
# can attack that position without moving from their current position. If not
# then they will do so, but if they can, they should do that, then escape to a
# safe distance. At least that is the way the AI is built. Examine the code
# for more details if you are interested.
if move
* @active_battler.current_action.move_pos = [@active_battler.x, @active_battler.y]
@active_battler.current_action.before_move = true
else
attack = false
I think my enemies aren't moving correctly for some reason. Any help will be appreciated.
def find_move_position(move, move_positions, routes)
# ok, so we want to now find the best movable position for the character.
# first thing to check is if they can move, if not return their current position.
# otherwise, we need to determine if they can attack their 'attack position'
# without moving. So we will need to generate the attack grid to see if they
# can attack that position without moving from their current position. If not
# then they will do so, but if they can, they should do that, then escape to a
# safe distance. At least that is the way the AI is built. Examine the code
# for more details if you are interested.
if move
* @active_battler.current_action.move_pos = [@active_battler.x, @active_battler.y]
@active_battler.current_action.before_move = true
else
attack = false
I think my enemies aren't moving correctly for some reason. Any help will be appreciated.