Hello,
I'm working with Revscript and I have a question about using onEquip/onDeEquip.
Is it possible to have the onEquip just call an external function instead of writing the full logic inside it?
Example:
In this case, Function would be a separate function defined somewhere else in the script.
Is this the correct way? Will it work properly without issues (scope, variables, etc)?
Or is there anything I need to be careful about when doing this?
Thanks in advance for any help!
I'm working with Revscript and I have a question about using onEquip/onDeEquip.
Is it possible to have the onEquip just call an external function instead of writing the full logic inside it?
Example:
LUA:
local moveevent = MoveEvent()
function moveevent.onEquip(player, item, slotPosition, isCheck)
Function(player, item, slotPosition)
return true
end
moveevent:register()
Is this the correct way? Will it work properly without issues (scope, variables, etc)?
Or is there anything I need to be careful about when doing this?
Thanks in advance for any help!