Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Press E to interact?

ygm7
Registered User
Quote
2017-11-08 15:21:46

This is similar to another question I asked, but a little different and would need a different answer.
I want to check for a key press when the player enters the radius of an object.
This would be for a door. Right now, it automatically opens and closes "On Proximity," but I want the player to have to press E to open the door (a 2d overlay will pop up telling them this.)

How would I do that?

Thanks!


techno-valley
Registered User
Quote
2017-11-08 15:33:09

Hello ygm7,

Simply, Before drawing set a new variable for example "NearDoor" = 0

Then change the variable value to one if within door proximity

Then assign to the player or the root node object if E is pressed do a certain action


ygm7
Registered User
Quote
2017-11-08 16:24:02

Works perfect, thanks!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact