1. The first thing you will need to do is create a new actor. You can either create a brand new actor or copy a model you want to be the actor. To add a new actor simply click add new near the bottom left of the editor, and then choose blueprint class. You can either choose actor or character, but for now choose character and name this enemy or anything that you see fit. After you choose character a new window will open. For you there may be nothing so you will have make your own mesh or import something you already have. Also be sure to add a box collision in front of the mesh, this will allow the character to do damage. To add a box collision simply click on add component and look for box collision.
2. Once you have a mesh for your enemy, you now have to make it do something. To do this click on event graph. Simply follow what I have put down. You will need to make a variable for is attacking. To do this simply click on the plus next to variable. This will create a new variable, make sure it is a Boolean, and be sure to name it is attacking. As a stated at the beginning creating AI is very easy. If you want the player character to take damage, that is also very easy to do.
3. You want to make sure you are in the player characters blueprint. Again simply follow what I have, you will need to create a variable for health by again clicking the plus. For this make sure the variable is a float.
4. If you have followed everything, the enemy you created should chase after the player character and if they get close enough should be able to do damage.





No comments:
Post a Comment