Can I trigger an attack action from a script event?
Posted: Sun Feb 02, 2020 12:06 am
I'm trying to have the equivalent of a discharge defense/land-mine attack go off on a script-defined trigger (say, when a character drops below a certain hp %). When looking around, I've found plenty of threads on how to define new attack types in the data stage, but I'm not sure how to trigger those attacks or actions in the control stage.
I don't want my attack to be usable outside of the script-defined events, and it looks like LuaEntity.set_command() can only be used on units, not characters. I may be able to create a temporary entity to "attack" once and remove itself for me, but wondering if there's a simpler way to handle this (especially since entities aren't always placeable on all locations).
My ultimate goal is to damage, stun, and knockback enemies around the character in a specific event handler. I have the script conditions figured out, I just don't know how to trigger the appropriate action(s).
I don't want my attack to be usable outside of the script-defined events, and it looks like LuaEntity.set_command() can only be used on units, not characters. I may be able to create a temporary entity to "attack" once and remove itself for me, but wondering if there's a simpler way to handle this (especially since entities aren't always placeable on all locations).
My ultimate goal is to damage, stun, and knockback enemies around the character in a specific event handler. I have the script conditions figured out, I just don't know how to trigger the appropriate action(s).