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"

Blueprint pause

Hey. I have a random delay before the blueprint starts functioning and I'm not sure why. alt text

Basically, after the damage function is called, it's supposed to set the timer to 10, and then the timer should subtract by 1 every second. Once this is done, health should be added. Everything works, except for the odd delay before the event starts running. Once it starts, everything works perfectly, there's no delay.

So.. Start game > random delay that shouldn't be there > event starts working > no more random delay > loops perfectly. Any ideas on why this happens?

Product Version: UE 4.20
Tags:
more ▼

asked Sep 21 '18 at 09:09 AM in Blueprint Scripting

avatar image

qmqz
1 1 1

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

2 answers: sort voted first

Okay, turns out that "Take damage" should be connected to the branch after Event Tick. I think this is odd that it doesn't check every second even when not connected, but oh well.

more ▼

answered Sep 21 '18 at 09:17 AM

avatar image

qmqz
1 1 1

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

How is it strange?

Your Take Damage does not work because it's invalid, the cast does not have an object and is not even connected to an execution flow...

Also, using delays in Tick like this is asking for trouble and a nightmare to debug.

more ▼

answered Sep 21 '18 at 12:37 PM

avatar image

Everynone
13.8k 74 25 58

avatar image qmqz Sep 21 '18 at 01:22 PM

It was odd for me because I've never used blueprints before. I just switched from Unity and assumed it was similar to Update and it'd be checking every frame. Anyways, everything else including the damage worked. Just wasn't sure why there was a delay. It's been solved, thanks for your input.

(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