Need some help, basically I want to set up an effect where if you kill an enemy with a fireball after combat the body has a fire effect, but if you kill them with a sword slash, it has a blood effect.
What I have done so far:
Problem I'm not getting the most recent attack I'm getting the second most recent (Sword, followed by Fireball is calling sword not fireball)
Best I can figure is my attack is landing but instead of the attack common event updating BEFORE the enemy dies, its trying to happen after.
Help?
Edit: Thanks ATT_Turan including v[x]=y; in the front of the damage for my attack script fixed this.
What I have done so far:
- On each skill there is a call to a common event to update the same variable with a unique ID for the skill.
- This tracks the most recent attack that was used
- On the Battle Event for the troop, on Enemy[1] Hp < 0% trigger event (battle)
- Update "killed by" variable to match the most recent attack ID
- On Victory right now I have it say "Attack x was used"
Problem I'm not getting the most recent attack I'm getting the second most recent (Sword, followed by Fireball is calling sword not fireball)
Best I can figure is my attack is landing but instead of the attack common event updating BEFORE the enemy dies, its trying to happen after.
Help?
Edit: Thanks ATT_Turan including v[x]=y; in the front of the damage for my attack script fixed this.