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"

I have a sequence of print strings and i want to be able to stop them when i press a button, how do i do it?

alt text

In this example i have the keyboard event 1 going into the strings i want to play. If i press 2 i would like all of it to stop from whatever point it is at, and then i would like to resume it by pressing 2 again. This will be in line with a video, so id like to add the pause functionality, but im just not a blueprints guy really, but i try. I have been stuck for a few days so i decided to ask for help, any is appreciated.

BTW this is just an example not the real thing, but its really close itd transfer 1:1 to what im doing.

Product Version: UE 4.16
question.png (168.2 kB)
more ▼

asked Aug 11 '17 at 07:45 PM in Blueprint Scripting

avatar image

3 1 2

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

2 answers: sort voted first

You could try creating a bool variable and a branch node; using it like a switch. So when 1 is pressed you could set the bool to true, if it's true print the strings. Then when 2 is pressed you could set the bool to false so the print strings would stop.

I'm not sure about the pause functionality, i've never used it, but I imagine you could say 'if bool is false - pause' then when 1 is pressed again and sets the bool to true - unpause/play.

more ▼

answered Aug 14 '17 at 12:30 PM

avatar image

143 6 6 11

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

Could you give an example of that? I dont really know how to set it up..

more ▼

answered Aug 14 '17 at 03:17 PM

avatar image

3 1 2

avatar image M.wmmn Aug 15 '17 at 11:54 AM

Having another look you could maybe look at using a gate node. A gate will stop the execution flow if something feeds into its 'Close' pin. So in this example below when you press 1, every frame 'Hello' will be printed out. When you press 2, it will stop the flow. Maybe that can help you a bit :) alt text

It has some issues with the delay node though, is there a way you can do what you're trying to do without it? As for directly pausing the function I imagine you could keep track of where the execution currently is by setting some variables but that's hard to describe without a wee bit more detail.

screenshot (23).png (165.5 kB)
avatar image HypnosVR Aug 15 '17 at 02:26 PM

Alright perfect ill try it out!

(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