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"

Key event not firing.

At first I thought that a Gate, a Branch, or even a AND wasn't working for me. But it was actually the key event. Thanks to Nken418 I realized that my key event wasn't firing. So he made me implement Enable and Disabled inputs into my blueprint. And again my code didn't work.(Continued to Answer)

Hopefully this new information will shed some light. I made a video showing how to re-create my project.

https://www.youtube.com/watch?v=C5wkkg7z5LY

If key is pressed, and character is in TriggerBox, then Play.

http://imgur.com/3VTw0jc

Product Version: UE 4.14 Preview
Tags:
more ▼

asked Nov 06 '16 at 11:59 PM in Blueprint Scripting

avatar image

MechWolf117
3 1 4 5

avatar image Holybreath Nov 08 '16 at 08:38 AM

use Gate

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

6 answers: sort voted first

The solution (and the very last thing I did before giving up) was getting a different key event.

Last night I replaced the 'E Key Event' with the 'F Key Event' and it worked. I also tested it without the Enable/Disable Inputs by directly hooking the Key Event up to "Play" and it worked.

The Next Day, I got an update for my Unreal Tournament, and the same thing happened once again.

The Key wasn't working anymore, and straight away I change it from the 'F' key, to 'Q' key and it worked again.

I will be making another post on "Why do only certain Key Events Work"

more ▼

answered Nov 10 '16 at 09:05 PM

avatar image

MechWolf117
3 1 4 5

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

Hello there! I would use a gate node where the gate opens and allows for you to press the E key while your character is inside the box and the gate closes when your character is outside of it.

alt text

I'm not quite sure where you put the code but if this is not in your controlled pawn the you'd also have to enable input either in the construction script or in the BeingPlay event. Hope this works.

gatenode.png (193.0 kB)
more ▼

answered Nov 08 '16 at 12:00 PM

avatar image

Nken418
353 11 3 14

avatar image MechWolf117 Nov 08 '16 at 09:58 PM

I'm starting to think my program is bugged because this doesn't work either. I think I'm just going to figure out how to set my Unreal Tournament version to 4.13.1. Because I can't find any information on this new version.

avatar image Nken418 Nov 08 '16 at 10:11 PM

If you connect your E key directly to the Play node does it work?

avatar image MechWolf117 Nov 08 '16 at 10:37 PM

WOW! No, it doesn't work. Wtf?

I also made an Event in Project Settings, from settings. Went to Input, made a new action mapping. Made the "E" key for the event. Still doesn't work. The most peculier thing.

avatar image Nken418 Nov 08 '16 at 10:59 PM

Ok so the next thing I would check is to make sure you've enabled input in whichever BP you are placing those nodes (If this is in your main controlled pawn).

alt text

If it is your main character then make sure the pawn is set as default pawn and the controller is correct.

enableinput.png (232.8 kB)
avatar image Nken418 Nov 08 '16 at 11:00 PM

Also, I believe if we're going to use the enable/disable input node on begin/end overlap, it might not be necessary to use the gate node.

avatar image MechWolf117 Nov 09 '16 at 12:12 AM

(Still doesn't work, nothing firing in blueprint)

I got an idea off of your new coding, and I'm positive you are on the right track. I'm going to try and make a class blueprint for my (object). I found some new information on this but I have look at the entire course and try to modify it to fit my situation.

I thank you because if I didn't recognize that my key event was activating. I probably would of gave up.

avatar image MechWolf117 Nov 09 '16 at 11:26 AM

I'm out of ideas. Class Blueprints do not implement Matinees so I can't play a matinee inside an Actor Class.

avatar image Holybreath Nov 09 '16 at 01:20 PM

Dude, in level blueprint, store all matinee references in array , and pass them to any actor /class you need...

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

How about combination of "Branch" + "AND" nodes.

1) From "E" pressed to "Branch" to "AND".

2) From "Overlap" to "Branch" to same "AND" node as above.

3) From "AND" output to Set Bool Variable

4) From Bool variable to Branch

more ▼

answered Nov 07 '16 at 12:15 AM

avatar image

ZBender
81 1 2 7

avatar image MechWolf117 Nov 07 '16 at 12:37 AM

Branch condition is not compatible with AND

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

Try this

alt text

unbenannt.png (92.9 kB)
more ▼

answered Nov 07 '16 at 12:16 PM

avatar image

Speckulous
540 22 10 36

avatar image MechWolf117 Nov 07 '16 at 10:22 PM

It didn't fire my movement matinee. I'm guessing you selected the TriggerBox when setting up OnComponentBeginOverlap. Because it confused me a little when it said (Box)

avatar image MechWolf117 Nov 07 '16 at 11:38 PM

http://imgur.com/tVP2XyR I tried this as well. But it didn't work. :'(

avatar image Speckulous Nov 08 '16 at 08:04 AM

Yeah I did mean Triggerbox, I just didn't recreat the whole situation. The boolean "IsInBox" should be in your PlayerBP, so you have to Cast to you PlayerBluePrint and set the value on true in there.

If your Matinee isn't playing, try printing a value instead, maybe there is something wrong with your matine. In all cases try to print out every variable until you get to loose end.

Try it with the bool, check if its false at the beginning and true if you are in the triggerbox.

avatar image MechWolf117 Nov 08 '16 at 09:42 PM

My matinee fires when I'm in the TriggerBox without setting up the character as the trigger. So it can't be that. Nothing is wrong with my matinee.

Whenever I add my Key Event. NOTHING FIRES. Even when I am in TriggerBox, there is no activity in my blueprint. And the last suggestion, I already tired. Doesn't work either.

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

How about , enabling / disabling input when user is in/out of the box? don't over-complicate ;)

more ▼

answered Nov 08 '16 at 08:39 AM

avatar image

Holybreath
383 10 7 19

avatar image MechWolf117 Nov 08 '16 at 09:43 PM

Doesn't work.

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

You could get an array of all overlapped actors when E is pressed, cast them all to TriggerBox in a foreach cycle and if one of them succeeds call Play.

more ▼

answered Nov 08 '16 at 10:05 AM

avatar image

AdamBors
111 2 4 9

avatar image MechWolf117 Nov 08 '16 at 10:02 PM

I'm just going to change my version from 4.14.0 to 4.13.1. To much hassle with this. I'm either dumb, my program is bugged, or the devs messed up the new versions code somewhere.

(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