Unity 2.5D - Testing for Character Script's almost final situation

Subscribers:
3,700
Published on ● Video Link: https://www.youtube.com/watch?v=o4S8muEoyKU



Duration: 1:44
124 views
10


Testing all script for characters.

-Made 3D Gravity Scale to run in PlayerController's FixedUpdate. This script is what's making the game run too slow with more characters on screen due to multiple FixedUpdate at once. Now is should be at least one Update and FixedUpdate for every character.

-Made my HP Script do it's own stuff. This gets all the Spawn Information such as Stock/Life count and PlayerCount. It also handles information that the DamageColliders checks such as if it's blocking, making the attacking character play FlinchedGuard Animation onHit. Finally it also looks for its corresponding HealthGauge, so if its PlayerCount is equal to 1 (which is the player character), it looks for the very first HealthGauge, which is then accompanied by it's Spawner Script that send all information to HP Script while Spawner Script enables the Gauge (as FindObjectWithTag cannot find inactive GameObjects).... that's alot.

-Separated a Spawn Script, which looks for SpawnLocations on start and gets the direction it should be facing on Spawn/Respawn.

-CharacterController, which handles all character inputs, this can also be used for an AI. This is actually a modified script of Unity's Ethan Character, so I'm using its logic but mixed with my own.

-Character, which is the character's information. This is where character specifics will happen, such as RunSpeed, JumpHeight, Animations to play such as Attacks, Damaged. It's also where my new Interface Script happens for Damage and Knockback Computation. Basically this handles ALL that's happening in fights. This runs inside CharacterController's FixedUpdate, a logic from Unity's Ethan.

And then there's my animation events to handle all information in Sprites.....


There's alot going on in one character, I wanted to memorize everything because sometimes I feel like if I miss something, everything will mess up, that's why I check all script everytime and memorize it so just in case it hits an error, I know where to go. But sometimes I prefer getting errors so that I know where I mess up.


I tried all scripts to not be reliant on other scripts unless really needed, so far those scripts are the SpawnLocations which is the basis on characters on where they will show up. This happens in SpawnScript of the character, which is then different to the SpawnScript of the BattleManager. It's just alot to take in, I know what I did but I still can't pinpoint exactly how I did it.


There's alot to take in, all I wanted is to make a system for myself but they all grew into bigger stuff, they works according to what I want but I still need to memorize it for my own comfort... is this OCD?