• self.BaseClass
    3 replies, posted
When do I need to call self.BaseClass.PlayerInitialSpawn (exemple) and why?
Never, unless you want [url=http://luabin.foszor.com/code/gamemodes/base/gamemode/player.lua#309]this[/url] to run. Assuming you are deriving from the base gamemode.
Ok, so if I understand well, if I do self.BaseClass:HUDPaint() and I derive from sandbox, it will run the HUDPaint of sandbox?
Yes, I think so. Although it's better to do (in your example) self.BaseClass.HUDPaint(self) - that way it works with your new gamemode table, and if you overrode any old values from the old gamemode it'll use the new values.
Sorry, you need to Log In to post a reply to this thread.