ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:    
Ambiera Forum > CopperCube > Help with CopperCube
Variables refuse to work
Author Text

j9907
Registered User
Quote
2018-01-13 14:53:43

I don't know if I'm doing it wrong or what (I don't think I am), but variables simply don't work for me. I'll explain what I did:

I made a "Before first drawing do something" event in the root scene node and set the variable "task-completed" to 0.

I then set it so it'll check "if task-completed = 1 then play a sound" and I left the else statement empty.

I made it so when you click the default cube it sets the task-completed variable to 1. That, in theory, should play my sound. It doesn't.

What am i doing wrong?


tim12345
Guest
Quote
2018-01-13 16:42:18

you set the "if task-completed = 1 then play a sound" in the "Before first drawing do something"?? that code only ran once, in the very beginning and is no longer checking for variables.


j9907
Registered User
Quote
2018-01-13 17:05:10

hmm, ok, though how would I make an object check a variable aside from doing it "every few seconds"?


tim12345
Guest
Quote
2018-01-13 17:47:35

you could probably use the javascipt interface for that by putting this code in the 'Before first drawing do something'...

function onFrameDrawing()
{

//////////// your code here to check for variables

}

ccbRegisterOnFrameEvent(onFrameDrawing);



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

Forum 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


   





Software: Ambiera Light Forum. © 2008-2015 Nikolaus Gebhardt, Ambiera e.U.