View Single Post
03/17/23, 12:02 PM   #1
nilo
Join Date: Feb 2022
Posts: 15
Questions about events, RegisterForEvent, RegisterForUpdate, ..

Atm I have a texture on screen when my role = LFG_ROLE_INVALID and this texture changes when I enter group according to my selected role. You can see in the ss how I'm doing it atm, however I want to do it more efficiently. I want to find a way to only UpdateMyRole when event EVENT_GROUP_MEMBER_ROLES_CHANGED is detected, I've tried a couple different ways using RegisterForEvent and RegisterForUpdate but no sucess and I can't find good info on how to use this and events in general.
Also I would like to know how impactful it is to game performance to use this "zo_callLater(function() LGRI.UpdateMyRole(myNewRole) end, 100)" as you can see inside my function LGRI.UpdateMyRole(roleId), and if it's good practice or not
Attached Thumbnails
Click image for larger version

Name:	3.PNG
Views:	307
Size:	45.7 KB
ID:	1548  
  Reply With Quote