The video game industry is built arround that, game engines use that model all the time as gameplay scripting.
https://dev.epicgames.com/documentation/unreal-engine/bluepr...