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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[bug] DoOnce passes continuously?

Currently creating a spawn actor to happen from an event in the character upon death.

But for some reason the DoOnce is continuously passing the execute to the spawn actor until the actor is completely destroyed as if the DoOnce was not even there.

Heres the blueprint alt text

Product Version: Not Selected
Tags:
drop.png (116.9 kB)
more ▼

asked Jun 02 '14 at 08:27 PM in Bug Reports

avatar image

DJMidKnight
1.2k 50 24 51

avatar image Sam Kushner Jun 02 '14 at 09:21 PM

Hello DJMidKnight,

I was unable to reproduce a scenario where the DoOnce does more than once. Double click on your node there to open it up and lets make sure that it looks like mine here.

alt text

~Sam

capture.png (225.1 kB)
avatar image DJMidKnight Jun 02 '14 at 10:47 PM

For some reason even if I use the DoN it still runs multiple times like the BP is resetting itself over and over until actor destroyed is called.

So ive narrowed it down to that if I put the DoOnce before the function it works but in the function above it does not.

avatar image DJMidKnight Jun 02 '14 at 09:50 PM

yea it looks right but when I Run the level and you die it just keeps letting the exec pass.

alt text

doonce.png (207.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello DJMidKnight,

I was testing DoOnce in the EventGraph of my test blueprint earlier, but now i can see that you are using it in a Function that gets called several times.

Each time you call your function, its making a new instance of that function, not calling the same one over and over again. So it's not really an issue of one DoOnce executing several times, but instead there are several DoOnce's executing once.

Just to make sure, here is my test. I made a blueprint called "S", and a function called "NewFunction". I call NewFunction once on BeginPlay. Then inside NewFunction, I loop the DoOnce node. The PrintString only printed once!

alt text

To fix your issue, what you want to do is reorganize the flow of your blueprints so that the function only gets called once.

Hope this helps!

~Sam

capture.png (51.6 kB)
more ▼

answered Jun 03 '14 at 02:19 PM

avatar image DJMidKnight Jun 03 '14 at 05:16 PM

I guess you missed one of the comments but yes I put the doonce outside the function and that worked fine. What is weird is the function is not being called but once on death and I have used this method in other similar functions without issue.

(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