Would a OOP be useful for making a pet system? If it is, can i have some examples of some methods/properties appropriate for it.
OOP
local pet = {} pet.__index = pet function pet.new(name, type) -- Type, could be Cat, Dog, Fish etc local petObject = setmetatable({}, pet} petObject.name = name petObject.type = type return petObject end function pet:GetName() return self.name end function pet:GetType() return self.type end function pet:FollowPlayer(player) -- Code here end return pet
If I'm correct, you could do something along the lines of this.