View unanswered posts | View active topics It is currently Fri Dec 27, 2024 8:10 am



Reply to topic  [ 6 posts ] 
 Is This Possible? 
Author Message
User avatar

Joined: Sun Feb 21, 2010 10:40 pm
Posts: 97
Reply with quote
Post Is This Possible?
Is it possible to have more than one function Create/Update/Destroy(self)?

I need to know for something I'm making.


Tue Jun 15, 2010 3:32 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Is This Possible?
Probably not, but it's pointless to have copies of the same function in one script.


Tue Jun 15, 2010 4:12 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Is This Possible?
Not really. There's also absolutely no reason to ever need to.

If you want to differentiate between, say, two actors running the same script, just add a self.PresetName == check.

Or, if you just need to do a specific piece of code, make an external function and reference it inside your Create/Update/Destroy.


Tue Jun 15, 2010 4:18 pm
Profile
User avatar

Joined: Sun Feb 21, 2010 10:40 pm
Posts: 97
Reply with quote
Post Re: Is This Possible?
Actually I needed to know cause I was making a batch file to easily make .lua's, and the way I have it set up right now each time I add something new it adds a completely new function Create/Update/Destroy(self). Well, I guess that makes this batch useless now.


Wed Jun 16, 2010 2:40 am
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Is This Possible?
Laraso wrote:
Actually I needed to know cause I was making a batch file to easily make .lua's, and the way I have it set up right now each time I add something new it adds a completely new function Create/Update/Destroy(self). Well, I guess that makes this batch useless now.


The entire point of lua is to be able to customize anything you want in the game. Why would you limit yourself/others using a batch file/premade program?


Thu Jun 17, 2010 3:33 am
Profile
User avatar

Joined: Sun Feb 21, 2010 10:40 pm
Posts: 97
Reply with quote
Post Re: Is This Possible?
It was actually sort of an experiment, to see if it was possible. I had the batch file coded correctly so I had successfully made a Lua generator for Cortex Command, but as you said, it was limiting. I don't really have a use for it. That's why I came here to see if it is even possible to use these Lua's at all, considering the way the batch makes them.


Thu Jun 17, 2010 9:15 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

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

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.050s | 13 Queries | GZIP : Off ]