You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
::VSLib.EasyLogic.Events.OnGameEvent_player_use <- function (params)
{
local ents = ::VSLib.EasyLogic.GetPlayersFromEvent(params);
This line ---------> "local targetid = ::VSLib.EasyLogic.GetEventPlayer(params, "targetid");"
local _id = ents.entity.GetIndex();
if(_id in ::VSLib.EasyLogic.Cache)
::VSLib.EasyLogic.Cache[_id]._lastUse <- targetid;
foreach (func in ::VSLib.EasyLogic.Notifications.OnUse)
func(ents.entity, targetid, params);
}
Can "targetid" be a VSlib player?
I think this should use the "GetEventEntity" function.
but, OnUse event has not issued an error so far.
The text was updated successfully, but these errors were encountered:
It's been a really long time since I coded this, but IIRC it should be compatible with VSLib player objects. player_use refers to a player object, which is also an entity but not just any entity, but a player entity.
::VSLib.EasyLogic.Events.OnGameEvent_player_use <- function (params)
{
local ents = ::VSLib.EasyLogic.GetPlayersFromEvent(params);
This line ---------> "local targetid = ::VSLib.EasyLogic.GetEventPlayer(params, "targetid");"
}
Can "targetid" be a VSlib player?
I think this should use the "GetEventEntity" function.
but, OnUse event has not issued an error so far.
The text was updated successfully, but these errors were encountered: