I am using a RegiterEntClass function, that is storing my Sent for Dupe support.
I call my creator is as follows:
Module = MakeMaglevModule(Ply,Pos,Ang,[ ARGS ])
Where “ARGS” are the cvar values stored in local vars (… Like Type - my controller algorithm, Info Enable, PID Parameters … and so on) with
the precise, only and same order ( one after the other ), as in storing like :
local a = self:GetClientNubmer("some_cvar_number") local b = self:GetClientInfo("some_cvar_sting") -- ... Module = MakeMaglevModule(Ply,Pos,Ang,a,b....)
In the “MakeMaglevModule” function i am calling “ENT:Setup”, which args have same names like “ARGS”, but with “m” suffix on the front like so:
Module:Setup(mType,mPID,mEnableInfo, .....) -- Like ma,mb and so on ...
After that i am storing the sent with the “RegisterEntClass” function in the Dupe libraty like so :
Where “…” are the rest of the “MakeMaglevModule” argument names like strings. Today if my internet works, i will upload the video i made yesterday.
The Duping error still persist in the console at the end of it.
And one more thing.
In shared.lua in ENT:Setup, i got the creator of the sensor Objects
self.Sensors* = NewMaglevRanger(Len,Pos,Dir)
They have the method “Draw”, which just renders a Line and Sphere in the 3D Space.
That method i can’t call serverside, so i have to use a Hook, because i can’t send a table
of “Sensor” objects ( … the Maglev Rangers ) in to “ENT:Draw()”, so is it like so ? ( in autorun server )
-- 1) hook.Add("Draw","Draw_Maglev_Sensors_With_Lines",MaglevRangerDraw) -- 2) Maybe i should use a for - pairs LOOP for achieving the right thing here, -- so all of my sensors should be drawn ... hook.Add("Draw","Draw_Maglev_Sensors_With_Lines",Sensors*:MaglevRangerDraw)
Regards DVD !