Need Help with Rocket!
2 posts • Page 1 of 1
Need Help with Rocket!
Have you seen FruitMonger's Super Sonic Rocket?
Please help me with the script, as I want to try and make a damn rocket with the same concept...
BTW I use Version 2.1.0
So can anyone please tell me the correct script for the sonic rocket? On my laptop, it works fine for about 30 seconds, and then it stops spawning the boxes, like forever! PLEASE HELP!
Please help me with the script, as I want to try and make a damn rocket with the same concept...
BTW I use Version 2.1.0
So can anyone please tell me the correct script for the sonic rocket? On my laptop, it works fine for about 30 seconds, and then it stops spawning the boxes, like forever! PLEASE HELP!
- Attachments
-
62512_Super_Sonic_Rocket.phz- (11.19 KiB) Downloaded 40 times
Some science teacher said one day,'Remember to leave the water dry...'
-

BAZOOKA - Posts: 22
- Joined: Fri Oct 26, 2012 5:45 pm
Re: Need Help with Rocket!
Modify the spawned box code as follows:
As you can see, I changed Density so that it can never become 0 (zero), and I added timeToLive := 0.1
So, instead of using Density to kill the boxes after a certain time period, I'm using timeToLive.
This prevents the strange timeout failure that you were having.
- Code: Select all
scene.addbox({
angle := (readable(e.geom)).angle;
angvel := (readable(e.geom)).angvel;
vel := (readable(e.geom)).vel;
size := [1.5, 0.5];
pos := e.pos;
timetolive := 0.1;
friction := 0;
airfrictionmult := 0;
heterocollide := true;
controlleracc := sim.time + 0.1;
density := 10;
colorhsva := [(e.geom.controlleracc - sim.time) * 120, 1, 1, 0.5];
drawborder := false
})
As you can see, I changed Density so that it can never become 0 (zero), and I added timeToLive := 0.1
So, instead of using Density to kill the boxes after a certain time period, I'm using timeToLive.
This prevents the strange timeout failure that you were having.
-

Xray - Posts: 501
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests



