x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Paragon assets as enemy ai

I am using the free paragon assets and am wondering how I can use them as an ai to attack me in my game. I have been looking around and have found nothing useful so I figured I would ask here.

Product Version: UE 4.21
Tags:
more ▼

asked Jan 28 '19 at 08:30 AM in Using UE4

avatar image

epjkb_games
1 1 1

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

That's a pretty vague question.

If you're just looking to add AI into your game using the Paragon assets, there are a ton of useful tutorials on YouTube, and plenty of documentation on the Epic website.

I'm assuming you're using blueprints, which is fine, makes things easier. Do some searching for AI blueprints on Google and you'll find information you're looking for.

more ▼

answered Jan 29 '19 at 08:31 PM

avatar image

Ronnie Olive
46 1

(comments are locked)
10|2000 characters needed characters left

It is a little bit complex but not too difficult. You'd want to set up a basic ai to follow you first, now you can use behavior trees or you can use the character blueprints to do so. Personally I prefer the second option as it requires far less communication between blueprints to deal damage etc, but more professional users will most likely opt for behavior trees.

A simple follow and attack AI in blueprints would go something like:

Event Tick --> Branch (make a boolean variable called IsAttacking for your condition) and connect the false to --> Branch (make a boolean variable called InRange for your condition) and connect false to the node --> --> AI Move To where target actor is "Get Player Character". Set an acceptance radius where they can reach you with their weapons. That takes care of movement.

The true pin in the branch which has the inrange condition would be connected to set the boolean variable "IsAttacking" to true, then ---> Play animation or anim montage where you have set up animation notifies, one that marks when you want the weapon to do collide with the player (ie be able to do damage) and one where you turn the collision off (otherwise the enemy can simply run into the player and do damage to it) --> You would then add a delay to allow it to finish it's attacking animation --> Then set the boolean "IsAttacking" to false so it can move again.

Of course you would need to set up animation blueprints for movement and use the animation notifies to call an event in your blueprint allowing it to deal damage and likewise in your playable characters blueprint to allow it to take damage.

It's all pretty involved and there are quite a few steps to it, it's hard to explain in text really. But there are tons and tons of tutorials for making basic AI out there. And don't worry, it might seem difficult but once you learn how to do it and you have the assets available to you (as in the character model and the animations), you'd be able to set something like this up in 10-20 minutes easily. But it requires some effort to learn the basics.

What I explained above is a simple way of moving and attacking while making sure that if the character is attacking, it cannot attack again until the first attack is finished. It also makes sure the AI won't move while it is attacking.

more ▼

answered Jan 29 '19 at 08:48 PM

avatar image

Crowley Caine
197 5 9 14

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question