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"

Is it possible to set function arguments with SetTimer?

I have some function ShowUI in blueprint which draws background dialog by getting the desired string, putting it in a bubble, displaying that bubble, then setting the bubble's visibility back to 0 several seconds later. The delay is accomplished by running another function, HideUI, through the SetTimer node. I would like to directly pass HideUI a reference to the object it should hide, as ShowUI already knows which bubble needs to be vanished, but SetTimer has no options for passing object references, even after I add a function input to HideUI.

Is there either an option to pass an argument along with SetTimer, or a more elegant way to accomplish what I'm describing?

Product Version: UE 4.8
Tags:
more ▼

asked Jul 31 '15 at 10:19 PM in Blueprint Scripting

avatar image

HInoue
246 95 66 83

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

1 answer: sort voted first

Are those Bubbles Widgets? If so You should tun The Timer in the Widget object.

more ▼

answered Jul 31 '15 at 10:34 PM

avatar image

Fluppi393
457 35 33 54

avatar image HInoue Jul 31 '15 at 10:53 PM

The bubbles are widgets, the problem is that there can be more than one bubble active at once- there are 5 scattered around the screen, and a random one is chosen every time text wants to display, so the timer doesn't have any way of figuring out which bubble it's supposed to vanish unless I hand it a reference when the bubble is made visible.

avatar image Fluppi393 Jul 31 '15 at 11:06 PM

You could simply use the Construct event in the widget blueprint to trigger a delay node, after the delay node you insert a remove from parent node. Does that solve your problem or is there a reason why this would not work for you?

avatar image HInoue Jul 31 '15 at 11:54 PM

That might work- to be clear, you're suggesting setting up a single speech bubble as a self-contained widget, instantiating a new one each time text is displayed, and using the constructor to make it destroy itself? For clarification, this is what I'm doing now- the widget has five text blocks, and every time someone speaks, a random block is chosen, set to the desired text, and set visible:

alt text

avatar image Fluppi393 Aug 01 '15 at 08:29 AM

Yes I would use a seperate widget for every Text. If you want a fixed amount bubbles you could place as many as them as you want in your parent widget, set them to invisible by default and unhide them when neccessary. But note that setting a widget to visible will not call the constructor, so you would have to create a function or event inside your bubble widget which sets up the timer and call it when you set it visible. And if you like to have an unlimited amount of bubbles in random positions you could dynamically create the bubbles widgets instead of placing them by hand.

(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