Extending another bot
Extending another bot
If I wanted to create a new bot, but wanted to use some of the methods of Defender, is there a way I could just link to it? That way, if I make changes to Defender it would automatically update the new bot.
I noticed in the SDK that some bots extend other bots, and I noticed things called backer and super. Can anybody shed some light on this subject?
I noticed in the SDK that some bots extend other bots, and I noticed things called backer and super. Can anybody shed some light on this subject?
- Black Pope
- Lux Exorcist
- Posts: 3878
- Joined: Tue Sep 06, 2005 5:36 pm
- Location: God's Right Hand
http://java.sun.com/docs/books/tutorial ... tance.html
Its not always about knowing. Sometimes its what to ask or were to look.
Its not always about knowing. Sometimes its what to ask or were to look.
It can be done, but due to the way Lux loads agents, you'd have to install a second copy of Defender just for the agent that subclasses it. So you wouldn't automatically get the new version when the installed Defender is updated.
BotOMatic extends BotOfDoom, and if you install BOM you'll notice it creates some folders in the Agents folder to keep another BOD.
BotOMatic extends BotOfDoom, and if you install BOM you'll notice it creates some folders in the Agents folder to keep another BOD.
Wow Pope, I never knew you were a trekkie!Black Pope wrote:I think if you run a plum line through the spectrometer you should be able to recalibrate the sensors on the warp drive.
Thanks for the info guest! That website was a big help for me when I started teaching myself Java. I just didn't know how Lux handled inheritance.
So if I have a set of specialized methods that I want all of my bots to use, I should just include them in every agent class, rather than putting them in another class and referencing it?dustin wrote:It can be done, but due to the way Lux loads agents, you'd have to install a second copy of Defender just for the agent that subclasses it. So you wouldn't automatically get the new version when the installed Defender is updated.
- Black Pope
- Lux Exorcist
- Posts: 3878
- Joined: Tue Sep 06, 2005 5:36 pm
- Location: God's Right Hand
Who is online
Users browsing this forum: No registered users and 51 guests