Re: Gibbing A Destroyer Cannon Shot
http://www.datarealms.com/wiki/index.php/LuaDocs/IndexWell this sohuld really help. I knew no lua at the biginning of the summer and I learned it all via IRC and this forum :3
Anyways, here's how you would do those methods.
1.)
Code:
function Create(self)
self.gibTimer = Timer();
end
function Update(self)
if self.gibTimer:IsPastSimMS(desiredtimehere in MS; 1000MS = 1Second) then
self:GibThis();
end
end
2.) Not 100% sure bout this one
Code:
function Update(self)
if self:GetAltitude(self.Pos.Y, 5) > (pixels above ground) then
self:GibThis();
end
end
3.)
Code:
function Update(self)
if self.Pos.Y > SceneMan.SceneHeight then
self:GibThis();
end
Hope this helps