Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
This one is likely easy - make a random flashing light

karmacomposer
Registered User
Quote
2018-08-30 21:44:28

I know a bit how to do it - at some interval do something

But then I get a bit lost.

I have a yellow light: YellowFlashingDoorLight.

It has a behavior - every few seconds do something

I set the MS to 1

The two actions I attached are:

set random value

I created a variable name: varRandom
Min 0 and Max 100

Integers is checked

Second action is 'if variable has a value do something'

I set the variable to varRandom
Is bigger than(>)
Value
0
Action:

Hide or Unhide Scene Node

Visibility change type - Toggle Visibility
Change with SceneNode - YellowFlashingDoorLight

It does not flash at all - and no yellow light either.

What did I do wrong or is this all wrong?

Mike


just_in_case
Moderator
Quote
2018-08-31 03:05:30

Once a scene node is hidden All of its behaviour will stop working... Try adding the same thing to root scenenode instead of the yellow light itself...

Add the the behaviour every few seconds do something to the root scene node then add random value.... Then if a variable has value then ... Hide or show yellow light.. It will work...


karmacomposer
Registered User
Quote
2018-08-31 03:35:58

if I have a variable varRand, how can I make the game pause for varRand's value and then continue?

Mike


just_in_case
Moderator
Quote
2018-08-31 06:41:28

what do u mean by game pause? do u mean to completely pause the game and then continue again from where left off...

for the flashing light here is an example to get the working of flash light...i have set the time to 500ms instead of 1 ms...
https://drive.google.com/file/d/...


Create reply:


Posted by: (you are not logged in)


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