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"

Countdown on pawn possesed

hi, does anyone here know how to apply a countdown to work on pawn possessed I need it for the game I am making.

Product Version: UE 4.19
Tags:
more ▼

asked May 29 '18 at 03:15 PM in Blueprint Scripting

avatar image

Theoreboat
1 2 3

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

2 answers: sort voted first

just use the event possessed node. it will be called when the character is possessed by a controller.

alt text

capture.png (17.4 kB)
more ▼

answered May 29 '18 at 04:26 PM

avatar image

ThompsonN13
10k 33 8 23

avatar image Theoreboat May 29 '18 at 04:27 PM

ThompsonN13 thank you

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

Have an integer variable named MaxCountDown.

In the example below, i made the total wait time MaxCountDown * 100 ms. If you want your MaxCountDown to be in seconds, change the time pin to "1".

Create a custom event, in my example named CountDownPossession. And create the built-in node "Event Possessed". When possessed, we want the countdown ticks to start, so we do exactly that. We set a timer to our custom event that makes it tick every {time} intervals after timer is set.

Every tick, our custom event is decrementing the count down variable, and checking if it is

If you want to count up, just have the variable set to 0 by default and increment every tick.

When you are done with your count down and if you dont want the CountDownPossession to fire continously, you can use the "Return Value" of the node "Set timer by Event" and do "Clear and Invalidate Timer by Handle".

Hope this helps!

alt text

capture.png (101.0 kB)
more ▼

answered May 29 '18 at 04:29 PM

avatar image

FlameOfIgnis
399 5 4 13

(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