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"

How to open a Gate when there's movement input, and close it when there isn't?

Hi! I'm trying to make a directional dash function that can only be activated when there's movement input (eg. player can only dash forward when W key is pressed). This is what I have so far:

alt text

I'm not entirely sure how to do the Gate here - I could of course get all four WASD keys to Pressed=Open and Released=Close, though I feel like it would probably break something when doing rapid movement inputs. Not mentioning that I haven't even added controller input yet.

Is there any way to do it more elegantly and more bug-proof? Thanks! (criticism to the BP itself is also welcomed)

EDIT: I figured it out! Using AND Bool -

alt text

Product Version: UE 4.22
Tags:
capture.png (248.3 kB)
capture.png (158.6 kB)
more ▼

asked May 02 '19 at 06:48 PM in Blueprint Scripting

avatar image

AshyGreeeen
3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Perhaps you do not need a gate at all, maybe it's just enough to ask the controller whether W is being pressed:

alt text

And launch character after this check.

Or plug in the W input Pressed / Released into the gate's Open / Close

capture.png (50.0 kB)
more ▼

answered May 02 '19 at 07:26 PM

avatar image

Everynone
15.2k 77 25 62

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