View Single Post
Old 05-04-10, 04:02 PM   #3
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
there are multiple things wrong with this code. First, your animation timer will never be reset because you told it not to:

The problem with writing the same code over and over instead of practicing code reuse is if you change one then you have to ensure you change them ALL. By localizing it all in one place you never have to worry about that ever happening

Thanks TheDarkWraith for your quick reply. Wastn't sure about the != part above as I copied that from the stock default Hud script had noticed you had == in your attack periscope script.

Yes, the fuction call is good practice - I had it called that way originally but when it didn't work. I did the Frankeinstein on it had chopped and pasted everywhere just to test the Night Time part of the code. Bad Practice

Thanks will give it another crack. And congrats with your new V2.1.0 its the biz.
reaper7 is offline   Reply With Quote