|
FAQ
• Search • Login
|
Author |
Message |
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Timer
Lord Tim wrote: I haven't tried, but leaving out the Destory(self) could infact break it. These aren't real lua scripts. They're parsed by Data's C++ code, and the functions are added to the C++ objects. If it doesn't find one of the functions that it is expecting, that could break it. Then how come my dozens of shitty scripts run fine without it?
|
Mon May 25, 2009 8:38 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Timer
it was probably just mind's syntax or capitalisation.
|
Mon May 25, 2009 11:21 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Timer
Hm. But i had something without the destroy function, and it didnt work. I guess ill have to try it again.
Ill post the code later after i make it again because the code was on my other computer, but im in another state now :p
|
Mon May 25, 2009 5:39 pm |
|
|
Lord Tim
Joined: Fri Apr 27, 2007 4:55 pm Posts: 1178 Location: America!
|
Re: Timer
Grif wrote: Lord Tim wrote: I haven't tried, but leaving out the Destory(self) could infact break it. These aren't real lua scripts. They're parsed by Data's C++ code, and the functions are added to the C++ objects. If it doesn't find one of the functions that it is expecting, that could break it. Then how come my dozens of crap scripts run fine without it? Well technically, that's bad syntax, not the other way around.
|
Mon May 25, 2009 6:02 pm |
|
|
Daman
Joined: Fri Jan 26, 2007 3:22 am Posts: 1451
|
Re: Timer
Lord Tim wrote: Grif wrote: Lord Tim wrote: I haven't tried, but leaving out the Destory(self) could infact break it. These aren't real lua scripts. They're parsed by Data's C++ code, and the functions are added to the C++ objects. If it doesn't find one of the functions that it is expecting, that could break it. Then how come my dozens of crap scripts run fine without it? Well technically, that's bad syntax, not the other way around. Well technically, I think your book of technicalities must be retarded, as including an empty function when it can work without it is most definitely bad syntax.
|
Tue May 26, 2009 1:25 am |
|
|
Mind
Joined: Thu Mar 06, 2008 10:54 pm Posts: 1360 Location: USA
|
Re: Timer
So what could be wrong with this? Code: function Create(self) self.timer = Timer() end
function Update(self) for actor in MovableMan.Actors do if actor.team ~= self.team then actor.PinStrength = 9999 if self.timer:IsPastSimMS(3000) then actor.PinStrength = 0 end end end end
and this didnt work either
function Create(self) self.timer = Timer() end
function Update(self) for actor in MovableMan.Actors do if actor.team ~= self.team then actor.PinStrength = 9999 if self.timer:IsPastSimMS(3000) then actor.PinStrength = 0 end end end end
Btw: they dont even get pinned.
|
Tue May 26, 2009 2:59 am |
|
|
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|