I’ve not behaved in not offering daily blog posts. So as I am back on track with this project I ought to make one for today.
It’s mostly about getting the battle system sorted out in Unity3D. As you’ve seen previously I’ve done the main menu with melee and ranged attacks and displayed the inventory with a scrolling system (and a tutorial on how to do it). Today is show how to make such an inventory system work, but on my set of Neuro attacks. The technique is to parse each of the items and pick out the name of the current selection and offer conditions for each name. In code it’s represented like this:
if (Stats.NeuroInv[x].modEff1 == “damage”)
Enem.HP -= Stats.NeuroInv[x].mod1;
Stats.MP -= Stats.NeuroInv[x].mpCost;
selectionM = 0;
selection = 0;
scroll = 0;
Stats.ATB = 0f;
So in this instance of the parser (not posting the entire parser code as it’s too long) . This part of the parser is checking skills of a certain ‘modifier’ type. My system is split between 2 modifiers because an attack might have a dual purpose, say, damage an enemy and lower his VIT. For simplicity, this is just one mod and it’s for attacks that damage an enemy. If the skill you’ve selected does damage, it’ll do that damage (in the code it’s using ‘mod1’ as it damage, just because I’ve not coded the battle maths for it), it’ll take away the MP (or concentration for Abeyance), reset the menus, use the cast animation and reset the ATB meter.
For the individual skill animations, there are separate conditions away from the battle calculations.
In the video, I only gave animations to 2 skills (for demonstration purposes, they’re not the actual particles to be used).
if (Stats.Neuro[x] == “Mindjolt”)
if (Stats.Neuro[x] == “Shades of Grey”)
So this checks the actual name of the current selected skills and assigns a particle animation.