I’m currently trying to work on a battle system script similar to the one found in Final Fantasy I. Problem is I don’t even know where to start. I know the very basics of Javascript and right now I’m not sure what scripts to attach to what gameobject and what the script should entail.
Basically right now I’m trying to create the very basics of the system which is a script that allows the player to select either attack and defend which attack deals damage to the enemy gameobject and defend reduces the damage taken. Can anyone show me how its done, or point me in the right direction where to start researching on stuff pertaining to this problem? I’ve tried looking at BurgZerg Arcade’s tutorials, but it’s simply overkill and not really the solution that I’m looking for here.
Each entity that can deal damage will need a script that holds that variable and code for doing so.
Each entity that can receive damage will need a script for that variable, and its code. (Since they’re probably always the same, these 2 scripts can probably be combined.)
You’ll have to decide if the items themselves will have stats, or you’ll just store stat data in a database and read it from there. The database is a lot easier to manage, but harder to program. (I’d go with a database.)
You’ll need some kind of game engine script that keeps track of turns, and who is currently doing something. And it’ll also have to trigger the enemy’s AI.
The enemies will need an AI script that tells them how to act.
There’s actually quite a lot more to it than this, but this is the general concept you need to start. I doubt any tutorial out there is really ‘overkill’, though. It’s pretty complex, even though it seems so simple.