Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Enabling or Disabling Node Behaviors via Scripting?

Samuel Pierce
Guest
Quote
2024-01-05 12:21:58

Hello!

I'm attempting to put together a very simple test scene as practice for developing a futuristic Mario Kart-style combat racing game, and I want to be able to disable the player vehicle's keyboard controls when they complete a race.
And I want to do so using scripting.

Is this at all possible?


okeoke
Registered User
Quote
2024-01-05 13:14:43

Hi,
It's not possible to enable/disable behaviors. If you're using a built-in behavior, you can create a copy of your node without behavior, hide it, and then replace real player with that node.


just_in_case
Moderator
Quote
2024-01-05 15:26:55

or if you are using when a key pressed something behavior, or some proximities and other behaviors, you can initialize them with if a variable has a value do something, and upon the usage is complete, simply set the variable to something else.

For this particular issue that you are facing do as @okeoke suggested by creating a dummy car hide it initially then upon completion of the race hide the playable car and show the dummy car.


Samuel Pierce
Guest
Quote
2024-01-05 22:24:49

Ahhh, I see. I'll give it a try. Thank you for your time. :)


Create reply:


Posted by: (you are not logged in)


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