Hello. I am adding "spell system" in my game. Spells are unique: one just do damage, another moves player in other position, another one adds buff, etc. Can it be implemented in Lua scripting? I mean something like
zeus_arrow.lua in
spells folder:
function handler(target)
--Implemented in C++
DamageCharacter(target, 20);
end
--Implemented in C++
RegisterSpell("Zeus Arrow", handler);
If yes, then how can I store
handler function in C++, and call it everytime when spell is used?