Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Execute a task when the scene loads

theonlyyeppii
Registered User
Quote
2021-04-01 18:22:34

I am making a game, and I have a 2D overlay that shows a variable. Instead of 0, it just shows $VARIABLE$. I guess to fix this, I need to set the variable to 0 when the scene loads. How could I do this?


Sven
Guest
Quote
2021-04-01 21:58:16

New 3D Scene==>Behaviour==>Before first drawing do something==> Set or change variable..

There set its
name
=
Value (Default is 0)


theonlyyeppii
Registered User
Quote
2021-04-02 10:27:58

Ooh! Thanks!


VeganPete
Guest
Quote
2021-04-02 11:27:29

theonlyyeppii wrote:
I am making a game, and I have a 2D overlay that shows a variable. Instead of 0, it just shows $VARIABLE$. I guess to fix this, I need to set the variable to 0 when the scene loads. How could I do this?


You need to add an "Update 2D overlay" to make it show the variable's value. Do this every time you want the overlay to update or do something like: every few seconds (1000ms), update 2D overlay "variable".


theonlyyeppii
Registered User
Quote
2021-04-02 16:51:30

@Sven's answer did the job!


veganpete
Registered User
Quote
2021-04-19 09:15:20

wrote:
@Sven's answer did the job!


Ah OK. I didn't think that changing a variable would update the 2D overlay, but glad you got it working.


Create reply:


Posted by: (you are not logged in)


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