Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Downloads

  • YT Simple Enemy AI 2D P1.zip
  • Starter Project.zip
  • YT Simple Enemy AI 2D P2.zip

Missing 1 full-res photo, 3 files, as this post has not yet been imported.

Content

Hey!

In this video I will show you how to reuse your player character to create a simple enemy out of it.

We will extract the Player Input code to a separate script to make the Player Character setup more reusable an in Part 2 we will create a very basic EnemyAI script. Enemies will Chase and Attack the player when we get in range.


Project files exclusive for my patrons are attached to this post :)


I hope that you will find it useful.

-Peter


Files

Previews only

Simple Enemy AI for a Unity game - P1 Enemy object setup

In this video tutorial we will create an Enemy for a 2d unity game by reusing the same setup that we use for our player character. To do this we will extract the code that gets the player input into a separate script. In part 2 we will create a simple Enemy AI script that will reuse the same character that we use for our Player to chase and attack the Player. Learn How to Make a 2D platformer in Unity: https://courses.sunnyvalleystudio.com/ Patrons link: YT Members: Check the community tab members only posts for the link Previous videos: https://youtube.com/playlist?list=PLcRSafycjWFcwCxOHnc83yA0p4Gzx0PTM Scripts: https://github.com/SunnyValleyStudio/How-to-add-enemy-to-game-unity-2d Assets used: https://analogstudios.itch.io/ 𝗛𝗮𝘃𝗲 𝗮𝗻𝘆 𝗾𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀? 𝗝𝗼𝗶𝗻 𝘁𝗵𝗲 𝗱𝗶𝘀𝗰𝗼𝗿𝗱! https://discord.gg/RQEtYHz 𝗣𝗟𝗘𝗔𝗦𝗘 support the channel: https://www.patreon.com/sunnyvalleystudio 00:00 Introduction 00:45 How to create an Enemy from the Player character 03:17 Extracting Player Input to a separate script 08:54 Using UnityEvents to send input to the character object #unity2d #gamedev #sunnyvalleystudio

Comments

No comments found for this post.