ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Help with CopperCube
forum topic indicator Enabling or Disabling Node Behaviors via Scripting?
person icon
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?

person icon
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.

person icon
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.

person icon
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:










 

  

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


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






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