I want to add objects new variable to manage their names

About advanced scenes, and the Thyme scripting language used in Algodoo.

I want to add objects new variable to manage their names

Postby AN9K » Sat Oct 08, 2016 1:08 pm

I'm an Amazing Marble Race creator. I have to manage lots of different color marbles to get which marble is eliminated, but I can't remember their color names completely.
So I need to make a new variable for marbles. But how can I make that?

By the way, when I make the variable, I will make a block with the following, to manage in what order marbles finished the leg:
Code: Select all
OnCollide=(e)=>{
text=text+ " " +<new variable>;
}
AN9K
 
Posts: 5
Joined: Tue Jun 30, 2015 12:14 am

Re: I want to add objects new variable to manage their names

Postby Kilinich » Sat Oct 08, 2016 4:16 pm

You may add variable beginning with _ inside marble geom. Vaiables with leading _ will be saved with scene.
Enter in script menu edit box: _color = "Red"
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 15 guests