• Entity Use Creates Multiple Derma Panels
    3 replies, posted
Hello, I am experiencing an issue with the ENT:Use function in conjunction with Derma panels. Whenever ENT:Use is activated, the derma panel gets created, however, instead of only an individual derma being created, i get eight. I have ENT:SetUseType( SIMPLE_USE ) in my ENT:Initialize function, but this does not seem to make a difference. Any help would be appreciated. Thank you for your time. init.lua ENT:Initialize(): ENT:SetUseType( SIMPLE_USE ) init.lua ENT:Use(): function ENT:Use()     umsg.Start("printerMenu")     umsg.Short("1")     umsg.End() end cl_init.lua printerMenu(ply): function printerMenu( ply )     local printerMenu = vgui.Create("DFrame")     printerMenu:SetSize(500,500)     printerMenu:Center()     printerMenu:SetVisible(true)     printerMenu:MakePopup() end; usermessage.Hook("printerMenu", printerMenu)
Don't use usermessages, they're deprecated
While they are deprecated, there's nothing inherently wrong with them. This is not how you use a function on an entity.
Welp, that was probably the stupidest mistake that i tried to correct on my own for a good hour and a half... Thanks for the help man
Sorry, you need to Log In to post a reply to this thread.