Announcement

Collapse
No announcement yet.

Creating buttons that spawn randomly, disappear after some time, and disappear when clicked?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating buttons that spawn randomly, disappear after some time, and disappear when clicked?

    I am trying to create a sort of mini game-like event in UE4's blueprint editor, but I cannot figure out the best way to do this.

    Basically, I have five "buttons". I want these buttons to randomly spawn in different places on the screen. The player is supposed to click on these buttons before they disappear. If they do not click on the buttons before they disappear, then the player will lose health. It is like a puzzle game combined with a rhythm game, almost.

    The problem is that I am missing the most important part, which is the blueprints for actually making these buttons appear randomly, fade away after a second (or less) and "destroy/deactivate" when they are clicked on.

    I know how to rack up a score, and take off health, and I have designed all of the buttons and UI elements (as long as PNGs will work for these assumed clickable/destroyable buttons) and have enough knowledge to make a scoring system for it, but I do not quite know where to start in making these buttons appear and disappear and all of the other functionality.

    It is very late as I am posting this, but I will be trying out some blueprint combinations first thing in the morning. In the mean time, could someone please help me with this. I am utterly confused.

    Thank you all for any help that you can give me. If you need more detail, screenshots, or anything, then I will supply you with it. I am very serious about this, and will do whatever I am asked. After all, you will be taking the time to help me with this process, so thank you again! ^_^

    #2
    Originally posted by Lizzie_Jo_S_1111 View Post
    [...]Basically, I have five "buttons". I want these buttons to randomly spawn in different places on the screen. The player is supposed to click on these buttons before they disappear. If they do not click on the buttons before they disappear, then the player will lose health. It is like a puzzle game combined with a rhythm game, almost.

    The problem is that I am missing the most important part, which is the blueprints for actually making these buttons appear randomly, fade away after a second (or less) and "destroy/deactivate" when they are clicked on.
    Make every 'button' a separate widget, create a fade out animation. This one here is changing both the colour and the opacity of the border (you can use a button) over 10s;

    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	35.9 KB
ID:	1132648

    The animation implementation inside the button widget:

    Click image for larger version

Name:	Untitled3.png
Views:	1
Size:	227.2 KB
ID:	1132651

    Spawn the buttons widgets:

    Create buttons in a loop, set their random location and play their Anim with a random timer.

    Click image for larger version

Name:	Untitled2.png
Views:	1
Size:	226.2 KB
ID:	1132652

    This is the general idea rather than an in-depth tut, hope that helps, though.

    Comment

    Working...
    X