Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Open Door on Key Press Only Within Proximity

argentarts
Registered User
Quote
2018-07-22 23:55:26

Hello.

I am learning how to use Behaviors and Actions in CopperCube. It's a lot of fun. Here's my question:

How can I set up a door to open on a key press (such as pressing "E") but ONLY when the camera/player is within proximity of the door?

I don't want the player to press "E" and have every door in the level open if I want to use "E" as an interact key. So, I want "E" to only affect things within proximity of the player/camera. I can see, via Behaviors/Actions how to do one or the other (door open on proximity or door open via key press), but not both.

Any help would be appreciated.

Thanks.


argentarts
Registered User
Quote
2018-07-23 01:22:51

Ok! I figured it out by using VARIABLES! Woohoo!!! This is fun. ;)


faith_254
Registered User
Quote
2018-08-20 08:31:30

how did you do it can you tell me?


behroz-khan
Registered User
Quote
2018-08-20 08:38:57

wrote:
how did you do it can you tell me?

I know man. I learned it by myself as argentarts did.
First set on proximity set variable "Door 1" to 1
and when proximity leaves set variable "Door 1" to 0
When key "E" is pressed check variable "Door 1" is 1, Open Door 1

Simple.. Isn't it?


faith_254
Registered User
Quote
2018-08-20 10:01:22

so basically when the varible is on 1 or the other an animation happens
right?


behroz-khan
Registered User
Quote
2018-08-28 15:38:50

Hmm... Sorry didn't understand you..
Tell me again


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Interna?ional" (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