Ok as everyone knows I am creating a platform script but I reached to a point where I need to create The battle system.I though of a way of making it pretty custumizable but I reached to a point where I could only do that by creating the enemies by Scripting them, but That would make my script be used by only those who new how to script.. So I decided to create a module with funtions for enemies, like enemie_touch, hurt, etc.This way every enemy will have it's own AI. The enemies will be simple to do(just need some praticse). Here is a example on how this would work:
the #do action thingy, iks going to be commands predefined in the AI module.
There is still alot to do, but tell me what you think of this Idea?
Code:
#Default Enemy
class Bee
#-----------------------------------------------------------------------------
# * Object Initialization
#-----------------------------------------------------------------------------
def initialize(id)
@me = $game_map.event[id]
@team = 1
#List of skills that the enemie can Use
@skill_list = AI::Skill_List[1]
#Agressiviness
@agre = 30
#Enemy Sight
@sight = 5
#Hear Range
@hear = 10
end
#-----------------------------------------------------------------------------
# *Frame Update
#-----------------------------------------------------------------------------
def update
#Check if the player is touching the event
if AI.player_touch(@me)
#do_Action
end
#Check if the player is in Sight range
if AI.player_in_sight?(@me,@sight)
#do_Action
end
#check if the player is in hear range
if AI.player_in_range?(@me,@hear)
#do_Action
end
#check if the player Attacked one team member
if Ai.team_attacked?(@team)
#do Action
end
end
the #do action thingy, iks going to be commands predefined in the AI module.
There is still alot to do, but tell me what you think of this Idea?