|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Author |
Message |
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
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 |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
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 |
|
|
Daman
Joined: Fri Jan 26, 2007 3:22 am Posts: 1451
|
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 |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
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 |
|
|
|
|
Page 1 of 1
|
[ 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
|
|