Wing 2.0.1
			5 posts			 • Page 1 of 1		
	
Wing 2.0.1
Since we have thrusters and "readable", time to upgrade wings.
Now it's really simple (should be but it's not )
 )
Code for thruster's force:
Force scalable via _airForceMult variable (create it in thruster's script menu).
p.s. There is a bug in 2.0.1 b15 (today version) - undo kills all scripts, so you need to reload scene. 
 
Plus you can't clone wing, but can copy-paste it
							Now it's really simple (should be but it's not
 )
 )Code for thruster's force:
- Code: Select all
- _airForceMult = 1;
 force = {
 geomData := readable(Scene.entityByGeomID((readable(owner)).geom));
 v := geomData.vel;
 n := [math.sin(geomData.angle), math.cos(geomData.angle)];
 (v(0) * n(0) - v(1) * n(1)) * owner._airForceMult
 }
Force scalable via _airForceMult variable (create it in thruster's script menu).
p.s. There is a bug in 2.0.1 b15 (today version) - undo kills all scripts, so you need to reload scene.
 
 Plus you can't clone wing, but can copy-paste it

Last edited by Kilinich on Fri Jan 06, 2012 8:29 pm, edited 2 times in total.									
			Dream of Algodoo as game development engine...
		- 
				 
 Kilinich
- [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Wing 2.0.1
Damnit kilinich. I've had this idea for ages but never been able to make it. Thanks for finally doing it.  
			
		
- 
				 
 Nxdt
- Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
Re: Wing 2.0.1
nice! you should have removed the killer planes though
			Basically, there are only 10 types of people in the world. Those who know binary, and those who don't.
Light travels faster than sound. That's why some people appear bright until they open their mouths.
		Light travels faster than sound. That's why some people appear bright until they open their mouths.
- 
				 
 monstertje3
- Posts: 343
- Joined: Sat Sep 05, 2009 4:29 pm
- Location: N-H, NL
Re: Wing 2.0.1
I copied the script but the trusters force was -0.00012 or something like that why ?does it have to be on your wing (truster)
			
		- hecta
- Posts: 21
- Joined: Thu Feb 02, 2012 3:39 am
Re: Wing 2.0.1
If you download the scene and save the actual thruster as a phunlet, the script should work fine every time you use it, don't copy/paste, just drag it out your phunlet menu. I think you might have forgotten to copy the _airforcemult varible or have adjusted the thruster slider to a constant value, this overides any scripts.
			
		- 
				 
 Nxdt
- Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
			5 posts			 • Page 1 of 1		
	Who is online
Users browsing this forum: No registered users and 8 guests


 
			



