Spawn tracer with dynamic size and color

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

Spawn tracer with dynamic size and color

Postby Rideg » Sun Sep 05, 2010 2:20 pm

Hello I'm trying to spawn a tracer that will grow bigger and gain transparecy. How can I do this?
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Spawn tracer with dynamic size and color

Postby Matten » Sun Sep 05, 2010 4:43 pm

hmm...
Dynamic variables?
You could use geval for this I think.
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands

Re: Spawn tracer with dynamic size and color

Postby Rideg » Sun Sep 05, 2010 10:01 pm

I'm not do fammiliar with the geval.
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Spawn tracer with dynamic size and color

Postby Matten » Tue Sep 07, 2010 7:58 pm

Example for circle with dynamic color, I know text is not possible for a circle, but it's as example for the escape string.
Code: Select all
geval("Scene.addCircle({
pos := e.pos;
radius := 0.1;
text := /"Watch the escape string/";
colorHSVA := {[sim.time, 1, 1, 1]}
})")
Cave Johnson wrote:Do you know who I am? I'm the man who's gonna burn your house down! With the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!
User avatar
Matten
 
Posts: 435
Joined: Mon Apr 05, 2010 2:03 pm
Location: The Netherlands


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests