Code:
function Create(self)
self.lifeTimer = Timer();
self.Vel = self.Vel*0.50;
end
function Update(self)
self.AngularVel = 10;
if self.lifeTimer:IsPastSimMS(5000) then
local explosion = CreateMOSRotating("Ronin RPC Explosion");
explosion.Pos = self.Pos;
explosion:GibThis();
MovableMan:AddParticle(explosion);
self.ToDelete = true;
else
self.ToDelete = false;
self.Vel = self.Vel*1.03;
end
end
You're looking at a projectile which is coming out of a gun.
I want the projectile to travel along the curve of a sine function, because it would be badass.
The thing is, the only way to set motion is through a property called Velocity(?), which is given through a vector.
I can change the projectile's velocity every time Update() runs (every tick I think)
http://wiki.datarealms.com/LuaDocs/MovableObject What it does:
What I want:
Any good ideas?
Right now it just flies faster and faster.