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"

Infinite wave creation problem

Hello Everyone, I'm trying to create a game with an infinite wave mode. I can initial the game mode with 15 enemies, but after their death, I can't go further. Here's my Blueprint.

1st wave inialiaztion

Here's my wave logic:

  1. Identify All enemies are dead in a certain wave.

  2. Then spawn next waves with 2 enemies increment on each wave.

  3. Loop again and again.

Please help me with some blueprint example. I'm totally new in UE4. And i'm not having a enemy dead counter on my character Blueprint. How to add that too ?

Product Version: UE 4.19
Tags:
2018-04-29-3.png (431.3 kB)
more ▼

asked Apr 29 '18 at 01:42 AM in Blueprint Scripting

avatar image

Gazzali Fahim
5 1 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first
  1. When finished creation of the first wave look if all enemies are gone

  2. If all are gone increase the amount of Enemies by two and start the for look again

  3. If not all are gone make a small delay and look again

    PS: Delay does only work in loops if you create a macro (try doing this https://www.youtube.com/watch?v=zh8xx9abzZY) List item

aiwavehelp.png (190.8 kB)
more ▼

answered Apr 29 '18 at 07:39 AM

avatar image

Norishou
21 1 5

avatar image Gazzali Fahim Apr 29 '18 at 07:57 AM

Thanks. But How do I check all enemies are gone or destroyed in a wave? That's creating my headache and when one enemy is dead, how to decrease that count from character blueprint? using an array or something else? If you have tine, please show me a blueprint like above

avatar image Gazzali Fahim Apr 29 '18 at 09:07 AM

@Norishou , THe length is not decreasing upon an enemy death !! Any solution ??

avatar image Norishou Apr 29 '18 at 09:09 AM

You can simply do this with the get all Actors of Class. Of the length of the array is 0 the there are no enemies left.

avatar image Gazzali Fahim Apr 29 '18 at 09:27 AM

myimplementation

@Norishou , I did it by the same you showed , but even an enemy dies, it doesn't decrease any length. My enemy is an of character class

2018-04-29-13.png (527.8 kB)
avatar image Norishou Apr 29 '18 at 09:45 AM

I have two things that could have gone wrong:

  1. The Delay Node is 5 seconds long so if you view it directly it might not show a change.

  2. Do you delete your the actor directly or do you have a dead function?

avatar image Gazzali Fahim Apr 29 '18 at 09:49 AM

@Norishou , Here's my Death or Damage logic and also I didn't create a macro like a video you suggested me. Damage and Death

2018-04-29-14.png (538.7 kB)
avatar image Norishou Apr 29 '18 at 09:51 AM

If you attach the destroy actor again it should work.

avatar image Gazzali Fahim Apr 29 '18 at 09:51 AM

Sorry That DeathActor is connected , but the time I captured it wasn't, Here's the updated one alt text

2018-04-29-15.png (539.5 kB)
avatar image Norishou Apr 29 '18 at 09:56 AM

You said you had a counter in your Character. You can simply use this in your wave creator by using a get player character and then cast it to your Character. After that you can use the function by dragging the pin out of the cast and searching for your function

avatar image Gazzali Fahim Apr 29 '18 at 10:02 AM

I am sorry to say I am totally new, show me some blueprint if you have time

avatar image Norishou Apr 29 '18 at 10:05 AM

I can do this in 4 hours

avatar image Gazzali Fahim Apr 29 '18 at 10:15 AM

Sorry to disturb you.. If you have time, then Otherwise your first solution is working fine !!! Greatest help, friend,.. savior !!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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