Proximity-based triggering

Hey there,

I’m wondering if there is an easy way to trigger events (using timeline animations: opening/closing doors etc.) when the player is within a range of the object? I figured I should create a blueprint with the door component attached to it, and a collider set to overlapping all dynamic objects. Then, in the event graph,i should create OnComponentBeginOverlap and OnComponentEndOverlap. This is as far as my wits can carry me. I’m new to blueprints and obviously lack the know-how.

From that point I want to:

  1. Propmpt the player in a HUD that they are within a range and can activate the interaction.

  2. Activate the four types of objects (door and three types of traps) with four different face buttos on the gamepad (already made way for this in the projects settings):

http://i.imgur.com/pe9GfbO.png?1

  1. Alternatively, after the first two are working, I would want to create a random pattern the player has to see and follow in order to activate the event. In case of faliure the prompt would reset after a delay of half a second. But this one is far too complicated for me to grasp atm, and thus it is entirely optional.

Thanks for all the help, guys!

Cheers,

Mike.

There is a “quickshot” tutorial that explains exactly how to do this (but in your case, it would be opening a door instead of turning on a light). The only difference would be instead of changing the light’s parameters, you would be telling the door’s animation to play.

More quickshots like this can be found here:

Thanks for pointing me in the right direction. I’ll keep the question open untill I’m done with the issue. In the meantime, do you have any ideas as to the pattern generation thing?

Well, for interaction, you could do something like this:

As for creating the random pattern, that could be as simple as the server generating a random number, storing it, and then sending it to the client which then uses the number to create a UMG UI display. If the client sends the right information back, then you can proceed.

However, if you are trying to do this pattern system as a means of bot-prevention… that’s a LOT more involved. The key issue here is that any information the server sends can be intercepted, and any algorithm you come up with to create the pattern can be decoded. That’s why Captcha works – the information sent to the client is just an image URL which the computer can’t decipher into the glyphs represented in the image (but a human can). If this is your objective, you’d probably want to either (a) implement your own Captcha client; or (b) implement your own image creation/modification system using something like ImageMagick on a Linux LAMP server.