Trying to open and close a gate inside NPC bp using keyboard presses and no effect.

I want to open that gate with the O key and close it with the C key for debugging purposes. So far it is not working. What am I doing wrong? Thanks.

Can you show us your code?

Sure, here is the gate.

Are you trying to use events in AI?

No.

Going from your picture O isn’t connected to Custom event and C is connected to Interface, not the custom event.

To make a long story short, what I ended up having to do was make two event dispatchers for the keyboard C and keyboard O. I made these two EDs in my third person character BP and created the keyboard inputs and dragged in the event dispatchers and chose “call” from the options.

Then in my enemy001 bp I first made a cast to the TPC, and chose to “bind” those event dispatchers. I used an Event Tick as I’m assuming you would need more then one pulse for this to work. I dragged out from the red event delegate and chose to “create event” . In this case I already had two custom events for open and close in front of the gate so I just chose those events in the drop down of create event. But if you didn’t have any you could just choose to create a matching event from that same drop down.

If any one out there knows an easier way to do this, please drop me a message and tell me, thanks.

Same thing, but a bit cleaner:

Ok thx, I will watch this and try to implement this if I can.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.