Scoring System

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

Scoring System

Postby HiredRock » Mon Mar 08, 2010 12:31 am

Can you set something so that it adds ten points to a box when a ball hits something, like saying on a box: score= 10 and then when a seperate ball hits something the box says score= 20? Thank you.
HiredRock
 
Posts: 5
Joined: Wed Jan 27, 2010 3:16 am

Re: Scoring System

Postby Kilinich » Mon Mar 08, 2010 12:47 am

It's a basic thyme. Try to figure out by yourself how scripts works.

1) scene.my.score := 10 in console
2) (e) => {scene.my.score = scene.my.score +10} in onCollide event of ball
3) {"Score: "+scene.my.score} in box's text property
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

Re: Scoring System

Postby HiredRock » Tue Mar 09, 2010 1:07 am

What is the box's text property?
HiredRock
 
Posts: 5
Joined: Wed Jan 27, 2010 3:16 am

Re: Scoring System

Postby KarateBrot » Tue Mar 09, 2010 1:17 am

Are you sure you want to do something like that before watching some tutorials?

Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Scoring System

Postby niffirg1 » Tue Mar 09, 2010 1:53 am

Yeah this is very simple scripting. That Tutorial ^ will tell you everything
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest