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"

Widget buttons pressed in a sequence to open door

Hello, I've created a widget with a series of buttons wtih letters attached to them, the goal here is a word search puzzle, once the player clicks on the individual letters that forms the word I want to be able to open a door. I have tried looking everywhere but I only found bits of information that really just confused me even further. If anyone out there has information on this you'll be my guardian angel forever.

Thank you

Product Version: UE 4.19
Tags:
more ▼

asked Jul 18 '18 at 04:25 PM in Using UE4

avatar image

chaz92
3 1 2

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

There are many ways you can do this. Two that I just thought up are:

  1. Branch nodes and booleans. A boolean variable for each letter say for example "Apple" Press A key on widget, set "A pressed" boolean to true, next key pressed is P, set "P1 pressed", execution continues till the end. If the player selects "F" for example, it will clear all boolean values back to false they will have to restart with "A". If the player selects a letter out of order the prior boolean would still be false like A then L, the L branch would check if the "P2 pressed" boolean was true, it won't be so it will execute the false output and clear all boolean values.

Other option (probably more scalable)

  1. Each button pressed it associated with a string letter. Have two variables of type string the first is "Final Word", the second "Answer"(you set this to whatever the word is you want to open the door). After each button is pressed "append string" and add "string letter" (associated with the widget button) to "Final Word" variable. At the end of input check if "Final Word" == "Answer" if true open door, if false, set "Final Word" to "" (empty), and start again.

more ▼

answered Jul 19 '18 at 02:27 AM

avatar image

Nebula Games Inc
4.6k 27 9 14

avatar image chaz92 Jul 19 '18 at 11:10 AM

thank you for your reply I'll get to it straight away, I'm assuming this is done in the widget graph editor?

(comments are locked)
10|2000 characters needed characters left
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