Talk:Scripted AI Objects: Difference between revisions

Jump to navigation Jump to search
m
→‎Code Feedback: moving to main article
m (what a messy, but fruitful, discussion this was :-))
m (→‎Code Feedback: moving to main article)
Line 92: Line 92:
I'll try to contribute a little but time, sadly is missing here !
I'll try to contribute a little but time, sadly is missing here !
—[[User:5H1N0B1|5H1N0B1]] ([[User_talk:5H1N0B1|Talk]] | [[Special:Contributions/5H1N0B1|contribs]]) 22:02, 29 October 2014 (UTC)
—[[User:5H1N0B1|5H1N0B1]] ([[User_talk:5H1N0B1|Talk]] | [[Special:Contributions/5H1N0B1|contribs]]) 22:02, 29 October 2014 (UTC)
== Code Feedback ==
* you can probably use forindex/foreach loops in a few places
* using named arguments in calls with many parameters would make sense eventually
* maketimer() should be favored over settimer()
* using isa() for sanity checking is a good thing!
* ideally, the code would be flexible enough so that existing code like tanker.nas can be updated/ported accordingly
* reset/re-init listeners should be registered to deal with sim resets/repositioning


== Things to keep in mind ==
== Things to keep in mind ==

Navigation menu