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"

Two-button controls (passive ability)

Hello, before I begin, please do bear with me if I seem a little hard to understand.

I have a few collisions that I enable at a press of a button in my game (Screenshots will be provided)

However, I would two inputs to trigger the collision because there would be several other collisions to enable.

I want the first button to serve as a passive or a toggle that grants you the ability to activate the collision. Sort of like turning on a fire mode before being able to release fire attacks.

I would really appreciate it if someone could help me with this.

Thanks for your time.alt text

Product Version: UE 4.18
Tags:
2018-03-31.png (309.7 kB)
2018-03-31-1.png (293.9 kB)
more ▼

asked Mar 31 '18 at 08:19 AM in Blueprint Scripting

avatar image

Grey27
41 6 12 12

avatar image Grey27 Mar 31 '18 at 08:20 AM

*would like

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

1 answer: sort voted first

if your just looking to find a way to toggle the easiest way would be to use a flip flop. this would enable in your case the first time the input is pressed collision to be enabled, then the second time inputs pressed collision to be disabled. see the picture below method 1.

another method would be to use a variable to control the flow of the script as in the second method in the picture below. basically on key input you set the variable. its the same basic method as above but just done in a different way.

alt text

capture.png (223.7 kB)
more ▼

answered Mar 31 '18 at 02:39 PM

avatar image

ThompsonN13
10.1k 33 9 23

avatar image Grey27 Mar 31 '18 at 04:34 PM

Hi, thanks for your time. I wouldn't say i just wanna toggle. Let me give an in-game example,

Let's say my character has 3 attacks activated by pressing Y,B,A (xbox controller) respectively.

Let's say he has a flame-mode, which I activate with the "LT" button, that changes his Y,B,A attacks into flame attacks.

and, say, "RB" activates water attacks.... and so on

You get me or I just got more confusing?

avatar image ThompsonN13 Mar 31 '18 at 06:57 PM

ok so if im getting you right then as per your example when you press LT it sets the attacks on y b a to be of the flame element, then when you press RB it switches those same attack buttons to water based ones. that seems like the perfect place for a type of switch or select. see picture below for example. let me know if im on the right train of thought.

alt text

capture.png (159.5 kB)
avatar image Grey27 Mar 31 '18 at 10:16 PM

Yes you are, will give this a crack in the morning, currently not near my pc.

(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