Delay and Air Bounce?

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

Delay and Air Bounce?

Postby Rideg » Mon May 17, 2010 10:42 pm

Hello I'm familliar with the delay as I use it almost all my scenes but this time I'm facing an obstacle.

I've set the controllerAcc to 0.0 and used the (sim.time - controllerAcc) >= 10 ? {do something; controllerAcc = sim.time}:{} method, but it doesn't activate until after 10 + seconds.

And when missile is finally launched it acts like it hits something at the mouse y.cord (it's supposed to pass the mouse) like an invisible wall, But the freakiest thing is that it doesn't explode and it's a 100% chance it'll explode on impact. (if it weren't for that bug/glitch).

Any ideas folks?
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: Delay and Air Bounce?

Postby KarateBrot » Tue May 18, 2010 12:14 am

Rideg wrote:but it doesn't activate until after 10 + seconds.


That's normal because in the script you said "do something when sim.time is at least 10 units bigger than controlleracc". If you want it to activate at other points in time you have to use other operators and other values.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Delay and Air Bounce?

Postby Kilinich » Tue May 18, 2010 12:17 am

How script related to rocket? where did you put it?
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: Delay and Air Bounce?

Postby Rideg » Tue May 18, 2010 8:04 am

I want it to have a 10 seconds delay before launching another one. @Kilinich
Code: Select all
sim.time - e.geom.controllerAcc >= 10 ? {Spawn the scene(rocket); e.geom.controllerAcc = sim.time}
Did you mean this? But the bouncing in mid-air is really freaking me out.

What I'm doing is a rocket spawner. It has "Anti Infantry", "Tank Buster" and the one that's having troubles is the "Nuke". it is spawned upleft of the mouse and is supposed to hit and that works (except with the "nuke")
Now you got a little closer llok of what i'm trying to acomplish.
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 2 guests