I am trying to make an entity become larger over time.
I have tried dissecting the entire code down right to the simple SetModelScale
For some reason the entity never seems to change.
Any ideas on what is wrong:
function ENT:Think() --Plant Size is set to .1 in SetModelScale and SetPlantSize in Initialize if self:GetPlantSize() <= 1 then local newscale = self:GetPlantSize() * 2 self:SetPlantSize(newscale) self:SetModelScale( newscale , 1 ) end self:NextThink(CurTime()+1) return true end
Interestingly enough this doesn’t even work:
function ENT:Think() self:SetModelScale( self:GetModelScale() * 1.25, 1 ) end
What’s the issue?
edit I feel that you can’t continuously update this…I will set it when the ent spawns and go from there.
Sad because you can’t work backwards that way… say to make it shrink again… If anyone has a solution to this It would be much appreciated.
After playing around with it, it seems that the second variable being something other than 0 breaks the code
function ENT:Think() self:SetModelScale( self:GetModelScale() * 1.25, 0 ) end
Is this broken in Garrysmod?