My game is based on choices and different routes and one of these routes requires for the player to kill every enemy with the same ability
Doing so will result in the player triggering an ending, while killing even one single enemy with a different ability should trigger a totally different route
How can I do this?
Triggering an event when an enemy is killed with an ability?
● ARCHIVED · READ-ONLY
-
-
not without scripts
it could be done by a complex series of troop events and script code in damage formula, but would be easier with a full script specifically for this purpose. -
yes and nonot without scripts
it could be done by a complex series of troop events and script code in damage formula, but would be easier with a full script specifically for this purpose.
(yes, not without scripts, and no, yes it can be done without scripts)
you can add a common event to each skill and process the count of kills from within the game, and save it into a variable, OR, you can tap into the enemy death function with a script and use it to trigger your calculation.
depends on how many skills you have, how many of them are accountable for triggering the effect, and whether or not your cinematics system would watch the code or the in-game variables.
there is no condition tool to go to a specific scene in the editor's tools, so you'll have to trigger that transfer manually if the end scene is another scene altogether.
but if it is a map, you can use the transfer command and decide the outcome of that transfer through a common event, and that common event through the variable system, and the variable system through another common event triggered by the skill being used.
it's kind of messy, but it's possible without adding a plugin. -
There are two skills available in this route (Mercy, the one that makes you continue in this route if you kill enemies with it and Give in, the one that ruins the route if you use it even just once)yes and no
(yes, not without scripts, and no, yes it can be done without scripts)
you can add a common event to each skill and process the count of kills from within the game, and save it into a variable, OR, you can tap into the enemy death function with a script and use it to trigger your calculation.
depends on how many skills you have, how many of them are accountable for triggering the effect, and whether or not your cinematics system would watch the code or the in-game variables.
there is no condition tool to go to a specific scene in the editor's tools, so you'll have to trigger that transfer manually if the end scene is another scene altogether.
but if it is a map, you can use the transfer command and decide the outcome of that transfer through a common event, and that common event through the variable system, and the variable system through another common event triggered by the skill being used.
it's kind of messy, but it's possible without adding a plugin.
If I created a common event for these two skills what would it be like?
Sorry if I ask too much btw, I'm just bad at these things -

get the scene, get the actor, get the enemy, get the last skill.
not in battle? drop out.
enemy not dead? drop out.
skill not valid? drop out.
you can also just throw all the comparisons into the same conditional, if you have only one case to validate.