This weeks goal of creating a turn system was met with success. It was a bit convoluted, but I realized that I needed to make a single script that could be used on both the Units since both players are playing. So I took the two scripts from before and put them onto two different colliders and made them communicate different numbers based on whose turn it was. It mostly worked but for some reason player 2 was having trouble communicating its values, and I think it was just a minor translation that was causing it to not reach the collider. I will debug it for next week. The next step is to have some simple UI displaying the Unit stats and turn number, and making a limited amount of turns for a player to move.
Documentation
0 Comments
For this weeks goal I successfully managed to get the the enemy unit and the player unit to deal damage by attacking each other. There were a few hiccups with syntax, but I managed to figure it out. The next step is incorporating a turn based system.
Link to documentationdrive.google.com/open?id=1laafNG7gLVMhTa-_42po_bUrWxaOe9OS After much debugging I managed to make the player unit detect the other unit, and stop if it detects it.
The main issue was that the movement stopped working for some reason, and I spent an hour trying to figure out why. It was odd because no code had been changed, and the data was saved correctly. Turns out NUMLOCK is something I had little understanding over, and my numpad was disabled because of it. So even though the KeyCode for numpad was correct, my inputs weren't being recognized because they were turned off. Video documentation The next step in this weeks design document is to implement unit interaction. Right now the 1st step is to have a stationary enemy unit that a player controlled unit will detect and not bump into.
|