10-01-2024, 08:18 AM
Quote:FYI: The older RPGMaker 2000 and 2003 engines allowed enemies both an attack and a 2xAttack in their Enemy attack definitions... Another REMOVAL of a feature that Enterbrain liked to do (and then return it and say... oooh, new feature).
It is a shame they did this. Now we have to add any old-new features manually through scripting or eventing. And if you lack the scripting skills like I do its a pain. To be honest I never touched a RPG maker newer than XP. 2000 and 2003 is a long, long time ago.
About this script though, I found an error when I try to use the skill againt a party of 1 enemy. After the initial hit, it crashes before the second hit, saying "Script Game_Troop TypeError occured. no implicit conversion from nil to integer"
In the Editor it points at enemy = @enemies[enemy_index]
Code:
#--------------------------------------------------------------------------
# * Smooth Selection of a Target Enemy
# enemy_index : enemy index
#--------------------------------------------------------------------------
def smooth_target_enemy(enemy_index)
# Get an enemy
enemy = @enemies[enemy_index]
# If an enemy exists
if enemy != nil and enemy.exist?
return enemy
end
# Loop
for enemy in @enemies
# If an enemy exists
if enemy.exist?
return enemy
end
end
end