By simple, I mean simple. The script basically made the AI move left. That was it, I added a velocity to the rigidbody that moved it in a negative y direction. So yeah, simple.
This was done, as this wasn't my area, but we agreed for me to create the spawn generation. To be honset, the spawn generation is also rather simple. With there being 3 different AI types, I needed a way to decide which one to spawn, so a random number is generated, and the AI that corresponds to that number is spawned. This script is attatched to an empty game object, and the AI that is being spawned is given the position of the game object.
The main features of the 3 different AI are;
- AI 1
- Shoots projectiles at the player
- AI 2
- Moves slow, will be melee attacking enemy
- AI 3
- Does nothing. Damages player when they touch it.
These different types will probably be updated after discussions with the designers.
To randomly generate the spawn locations, I have a script which creates the ai spawn game object, and gives it a random vector within a predetermined range. This is done within a loop, which allows me to generate as many different locations as I want.
No comments:
Post a Comment