Skip to content
#3682
Auto-translated
Jewilly, there is a way to pass all the necessary data to the callback using upvalues:
function test()
  local importantValue = random(10)
  Trigger(4, "TestObject", "ImportantFunc")
  ImportantFunc = function(hero, obj)
    local value = %importantValue
    print(hero, obj, value)
  end
end
--This way, we pass the two original arguments + the important value from the parent function to the callback.

Statistics

Welcome our newest member: dodoD0D0

Users Online 2 users 1407 guests