#3. Script Making Process


Hi, 

(Giving an update on the book, one of the things I keep asking myself is "What should I start with?" lol, it's a little road stop sometimes.)

I have been putting aside some of my best scripts or pretty unique scripts that I've used in my projects, or one's that I've added onto to make it less basic. For the next FREE update that I'll be releasing I've been working on putting some AI (Artificial Intelligence ) into the book. So person's who aren't good at that kinna stuff like I was (still am, but I've learnt it's a matter of making it functionally responsive how you want it to, rather than how you choose to code head on) these are basic AI Systems that you can easily add on to use Animations with and can work well if you don't have any either.

What Types of AI Script will be Included?

Based on what I have already provided as Assets in the Resources Index I made with over 30+ FREE Game Assets made by other artist and designers that you can find right here on Itch, plus I personally went through each of them to write a review on which one's compliment and could be used to enhance your project together harmoniously and why it works. I decided to make 2 basic scripts:

  • AI Patrol Script

This is like the NPC's in the Mario Games that walk along the platform no matter what length it is it is across.Platformer Mechanic

Walk & Turn Animation from "TIGForums"

 I've additionally added a feature that will allow you as the beginner to dictate at slopes if you want that particular NPC to walk onto the slope area or not by adjusting the length of checker to be longer or shorter. The Longer it is, the greater the ground distant has to be from the NPC for it to be like Nope! Not going there! While the Shorter does the opposite, giving  you the control to limit them at points where the platform's height change but you want to set it to your preference.

Example of The Ground Checking Parameter in Action

  • AI Guard Script

This script is for the enemy type that would be standing guard at a specific point instead of patrolling. Once the player reaches a specified distance into it's attacking range it will attack, and if the player manages to get closer based on also another specified distance, the NPC will step back until out of range.

Whoops! O-or out of platform to stand on😅. I'm going to be adding on this feature during the week allowing for the NPC to:

  • Detects edge and launches a final attack attempt at the player due to being cornered 
  • Take back original spot a few seconds after player leaves attack zone

These will make the code a little lengthy, so I will then run back through it and optimize it so that it will be simpler to not only type up, but also be more performant for your project.

(Now that I look at this too, this same Guard script can be used for a shy enemy type that will only attack you if cornered... that would be quite a BRUTAL attack.... I mean, using real life as a reference: Squirrels, some rats etc.)

I'm also adding some premium assets with some Jamaican culture to it to the Resources Index here on Itch. For those of you doing the CAPE Animation & Game Design Exam in Jamaica, you will LOVE this one lol (can't share much on it right now, but will do so once it's out here in a blog post😁).

If you enjoyed reading this and want to keep updated on the C# Scripting Manual for Beginner Unity Dev's, consider following this page to keep updated with it's development through the Blog Posts.

Files

C# Scripting Manual - Simulation.exe 10 MB
May 30, 2021
Unity C# Scripting Manual_4thPreview-Version.pdf 1.1 MB
May 30, 2021

Get C# Script Manual for Beginner Unity Dev's

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.