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"

Having a problem with making a simple blueprint to detect when the player is afk, so i can switch to the afk flipbook

so im having a problem, i want to make a blueprint so the game understand that the player is not moving. then make the game switch to the idle flipbook for my character.

Product Version: UE 4.14
Tags:
more ▼

asked Feb 09 '17 at 07:51 PM in Using UE4

avatar image

Chippred
13 3 4 6

avatar image Chippred Feb 10 '17 at 12:39 PM

help would be appreciated :)

avatar image Ozcorps Feb 10 '17 at 05:26 PM

Okay you need to think unreal needs to k n ow every tick what state the player is in or it won't recognise the flipbook change... So will be stuck in right walk even though you stop pressing right... till you press another key... I have working sprite sheet code ill post in a bit

avatar image Chippred Feb 10 '17 at 06:00 PM

sweet! :D i'll try learn from that code when you post it then :)

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

2 answers: sort voted first

Hey, figured it out, just copied the project @Ozcorps posted at his user :) really useful! :D Thanks man ^^ https://answers.unrealengine.com/questions/532226/2d-sprites-and-animations.html

more ▼

answered Feb 27 '17 at 10:05 PM

avatar image

Chippred
13 3 4 6

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

you can get the players vector and dedect for how long it didnt change and set it to bool and if its like a shooter multiplayer and bullets move you also try to dedect the amount of time a key wasent pressed

more ▼

answered Feb 10 '17 at 04:54 PM

avatar image

678GUY
141 32 32 37

avatar image Chippred Feb 10 '17 at 05:07 PM

is it possible to show this with a blueprint? this is what im working with at the moment, not a pro at unreal alt text

help1.png (165.7 kB)
help2.png (196.8 kB)
avatar image shotty46290 Feb 11 '17 at 07:36 AM

Just add a bool which flips true after pressing a button and have a timer count down if its true that flips it to false after so long(heads up your timer will need to reset on button press aswell)

avatar image 678GUY Feb 11 '17 at 11:21 AM

make a timer and have a all keys output and when the all keys is pressed reset the timer if the timer is done swtich the flip book

avatar image Chippred Feb 11 '17 at 11:45 AM

so this will solve the idle problem :) but as Ozcorps said i also have another problem, the last key i press is the key that count, so if i press right, then up, and after that left and hold the keys, the character will move up but have the left flipbook, i know its not what i asked for in the beginning, but it is nice to fix when im first working at it :D Btw thanks for answering, i will work with what you guys said

avatar image Chippred Feb 11 '17 at 12:10 PM

i just realised how noob i am, i made a input in project settings called "all keys" it activates if any key is pressed (not sure if that is what you ment) and then i will connnect that to a timer?

avatar image 678GUY Feb 11 '17 at 12:20 PM

yes there is a thing a key that is every key, make a tick event with a delay of a secend after it and branches and stuff that when its 60 add to min and reset secends someting like that and when the every key is pressed just reset all the var's

avatar image Chippred Feb 13 '17 at 03:40 PM

could you try to post a picture? :) trying to learn this, and need visualization/picture to work from

avatar image shotty46290 Feb 14 '17 at 06:34 AM

Im finishing up with a move and i get network tomorrow. I can then show some pictures showing how to do an idle timer

avatar image Chippred Feb 14 '17 at 10:10 AM

thank you :D really nice of you

avatar image shotty46290 Feb 14 '17 at 11:46 PM

I figured a video with explanation of what is happening would be more suitable. Here is the link

https://youtu.be/j2nbtwMpmTU

avatar image Chippred Feb 16 '17 at 12:06 PM

I followed your video, and it does change to the idle animation, the problem is that if i press the "w" and "s" at the same time, and release one of them while pressing the other the character switches to idle but are moving :) this is because of the boolean that is connected to "released" on the W and S event. :/ dont know how to solve that

avatar image shotty46290 Feb 17 '17 at 12:38 AM

You could add a second check in the looping event that checks to make sure you are not moving and set it false when you are moving no matter what buttons are being pressed.

avatar image Chippred Feb 20 '17 at 12:11 PM

if you take a look at my other comment it could be another solution :)

avatar image Chippred Feb 19 '17 at 05:32 PM

I think that a better solution would be to let the game know if the character is standing still, moving right or any other direction. this will remove the multiple key pressed and released problem. i think that something with vector would work, but i just dont know blueprint enough to figure it out. If anyone have a blueprint solution for this it would be nice! :)

avatar image Chippred Feb 24 '17 at 03:09 PM

i hate to ask all the time, but it would be nice to solve this problem :)

(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