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"

Random images in Widget Blueprint

Greeting UE Community, So basically what I want is to random an image on the screen whenever a press a key. What I have done : alt text So the problem here is when I connect the return value of get to the texture from Create brush from texture, the result will be that it will continuously drawing all images ,not showing only one random image. alt text This is the blueprint of the object that detects the pressed key. I know the reason. As long as the image is still on the screen , it will always get random values of the image array and return another image all the time.

Product Version: Not Selected
untitled.png (486.9 kB)
untitled.png (491.1 kB)
more ▼

asked Jan 08 '17 at 10:50 AM in Blueprint Scripting

avatar image

RJS Jake
20 4 12 8

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

1 answer: sort voted first

move everything from GetBrush, into EventConstruct. because EventConstruct is only called when the widget is created, instead of repeating all the time.

more ▼

answered Jan 08 '17 at 06:21 PM

avatar image

9.6k 320 205 450

avatar image RJS Jake Jan 08 '17 at 11:34 PM

Omg thank you so much :D It works perfectly xD

avatar image Era_Z99 Feb 04 '17 at 10:29 PM

How do you do that, you can copy the return node etc.

avatar image Meeeehh Aug 06 '17 at 01:55 PM

Hi, how can you move everything from GetBrush into EventConstruct? i'm stuck there :( GetBrush function is not needed anymore after moving everything? Apologies, i'm new on Unreal Engine.

avatar image RJS Jake Aug 06 '17 at 03:58 PM

Just move everything behind the GetBrush node to the EventConstruct

avatar image Meeeehh Aug 15 '17 at 09:13 AM

But how can you do that? How can you insert everthing from GetBrush into EventConstruct without the return node? I guess that the GetBrush binding is not needed anymore after that right? Apologies, i'm new to Unreal and i'm kinda lost yet.

avatar image Meeeehh Aug 15 '17 at 01:24 PM

alt text

This is how my GetBrush function looks, my idea was to create a loading screen with an array of images so that every time the loading screen appears, a different image is displayed at random pick.

The thing is that i don't understand what can i do in order to connect what i have inside GetBrush to the EventConstruct.

getbrush.png (147.2 kB)
(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