| Data Realms Fan Forums http://45.55.195.193/  | 
|
| Reversed Air Resistance - Exponential Speed Increases http://45.55.195.193/viewtopic.php?f=1&t=17356  | 
	Page 1 of 1 | 
| Author: | Ameefmu [ Sun Dec 13, 2009 3:10 am ] | 
| Post subject: | Reversed Air Resistance - Exponential Speed Increases | 
Hi all. I'm trying to create a particle to be fired from a bomb or from a weapon, that begins with a movement speed of 5, yet increases drastically for each second it's active. I've tried setting a negative AirResistance variable to the particle, yet that does absolutely nothing to the speed at which it progresses. I'm looking for a way to create the desired effect, preferably just by modifying the .ini file, but I'll have a go at Lua if necessary. It seems many variables can be modified by making them negative, I guess I just got my hopes up about AirResistance a bit too early. Thanks in advance! Ameefmu (Who's still a Crabling, despite purchasing)  | 
	|
| Author: | CaveCricket48 [ Sun Dec 13, 2009 3:26 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
Code: function Create(self) self.AccelTimer = Timer(); self.acceleration = 5; -- acceleration self.accelpertime = 1000; -- per time end function Update(self) if self.AccelTimer:IsPastSimMS(self.accelpertime) then self.AccelTimer:Reset(); self.Vel = Vector(self.Vel.X,self.Vel.Y):SetMagnitude(self.Vel.Magntiude+self.acceleration); end end Attach that script to your particle.  | 
	|
| Author: | Ameefmu [ Sun Dec 13, 2009 5:13 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
Thankyou sir, with a bit of number tweaking it worked like a charm  
		
		 | 
	|
| Author: | Geti [ Sun Dec 13, 2009 7:17 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
why not just Code: function Update(self) self.Vel = self.Vel * 1.5 --put your number here end obviously 1.5 will make it go inordinately fast, but tweaking should be easy enough.  | 
	|
| Author: | Roon3 [ Sun Dec 13, 2009 8:29 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
How about this Code: function Create(self) self.A = <Insert starting speed of choice>; end function Update(self) self.Vel = self.Vel.Normalized * self.A; self.A = self.A + <Insert increment of choice>; end ?  | 
	|
| Author: | 411570N3 [ Sun Dec 13, 2009 9:30 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
How about directly reading from Air resistance and applying only if it's negative?  | 
	|
| Author: | Geti [ Tue Dec 15, 2009 5:36 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
cause that would be silly when you could do it with an int and save reading the airresistance, and check how it works with PresetMan:ReloadAllScripts()  | 
	|
| Author: | AtomicTroop [ Wed Dec 16, 2009 11:56 am ] | 
| Post subject: | Re: Reversed Air Resistance - Exponential Speed Increases | 
Right, so you purchased already? To get rid of the crabling, go to your forum profile settings and add your reg key to the corresponding slot.  | 
	|
| Page 1 of 1 | All times are UTC [ DST ] | 
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/  | 
|