Recently, we were asked to write scripts that came together to make a game with a health bar, enemies, and more. A task that proved challenging since we hadn't learned many of the basics behind writing C# code. Coding the enemy AI system so that it moved around the map and patrolled for the player model proved to be surprisingly easy. Making a health system that connected to a health bar image went pretty smoothly as well. The real problem was linking those two systems together so that the enemy could do damage to the player. I tried a bunch of different things, but I'm not sure I would've ever been able to get it to work with the code that I copied. Now that I know some of the basics, I'm hoping to be able to go back and rewrite things. There will probably be a lot of trial and error, but I've discovered the most satisfying thing about writing a script is getting it to work after you have fixed all the little issues.
top of page
Post: Blog2_Post
bottom of page
Comments