Do not ask why this is called by this name. It just is. Thanks for understanding. So, this script is being used to be able to freely move the camera around the map, by moving the mouse to the edge of the screen. By doing that, it will move the camera in the mouses direction.Continue reading “Uncle James Patented Scroll Mouse”
Category Archives: Code
Effects
There are 5 status effects in the game. Here are the different effects. This effect is poison, and reduces the health of the character by 10. Burning does more damage than poison. Stunned sets the can Attack boolean to false. Wet slows down players, reducing their speed. Bleeding does the least amount of damage outContinue reading “Effects”
Camera Move
The variables in this script are target game object and the offset for the camera. It starts off with setting the offset. It does this by getting the position of the camera to the target. Here is where the target is specified. The target is the active player. It then changes position depending on theContinue reading “Camera Move”
Health Bar
It uses the game object, which is the slider. It then sets the slider to the max value, which is the health, then sets the value of slider to the health. Very simple script.
Billboard
This script here is just to make sure the user interface always faces towards the camera.
AI FSM Actions
This is where the actions the AI can make. It is quite long. Enjoy! First thing, it will call the NavMeshAgent in the void Start function. We will be calling it nAgent, so it is easier to type. The first action that the AI can do. Moving! Specifically towards the closest player character. We willContinue reading “AI FSM Actions”
AI FSM Manager
This is the manager for the AI. This is how the AI will act in the various phases in battle. So, first it will call the AIFSM Action script for the actions they can do. It will also call the Character stats, since that is needed to know the accuracy, range, damage and move. So,Continue reading “AI FSM Manager”
Character Shoot Code
This code is how the characters will shoot and apply damage. Lets get straight into it! So, the first thing here is that the code is calling the CharacterStat script and the game objects. Since we need the character stats to indicate whether the opponent is within range. Then, in void start, it will immediatelyContinue reading “Character Shoot Code”
Team Manager Script
This is the longest script at the moment out of all the other scripts. This is gonna be fun to talk about! To start off again, here are the variables which will be used. So, the first part is it will be calling the game objects that are teamMembers and enemies. Nothing too difficult. TheContinue reading “Team Manager Script”
Character Movement Code
At the top, it references the stats from the Character Stat script, so it will be using those stats. As well as a boolean for moving, to state whether the character is moving or not, true or false. Next it references the the NavMeshAgent as nAgent, so it is easier to type. Finally, there isContinue reading “Character Movement Code”