Guest User

RPG Maker MV Undo effect. :D (FIXED)

a guest
Sep 16th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. Here is the effect shown in the video first:
  2. <Custom Apply Effect>
  3. user._time = 1;
  4. user._timeHp = user.hp;
  5. user._timeMp = user.mp;
  6. </Custom Apply Effect>
  7. <Custom Turn Start Effect>
  8. if (user._time === 1) {
  9. user._timeHp = user.hp;
  10. user._timeMp = user.mp;
  11. user.startAnimation(119);
  12. }
  13. </Custom Turn Start Effect>
  14. <Custom Turn End Effect>
  15. if (user._time === 3) {
  16. var Atime = user._timeHp - user.hp;
  17. var Btime = user._timeMp - user.mp;
  18. user.startAnimation(119);
  19. user.gainHp(Atime);
  20. user.gainMp(Btime);
  21. target.startDamagePopup();
  22. target.clearResult();
  23. user._time = 0;
  24. user._timeHp = 0;
  25. user._timeMp = 0;
  26. } else {
  27. user._time += 1;
  28. }
  29. </Custom Turn End Effect>
  30.  
  31. For the normal bravely second effect(effect in one turn):
  32.  
  33. <Custom Apply Effect>
  34. user._timeHp = user.hp;
  35. user._timeMp = user.mp;
  36. </Custom Apply Effect>
  37. <Custom Turn Start Effect>
  38. user._timeHp = user.hp;
  39. user._timeMp = user.mp;
  40. user.startAnimation(119);
  41. </Custom Turn Start Effect>
  42. <Custom Turn End Effect>
  43. var Atime = user._timeHp - user.hp;
  44. var Btime = user._timeMp - user.mp;
  45. user.startAnimation(119);
  46. user.gainHp(Atime);
  47. user.gainMp(Btime);
  48. target.startDamagePopup();
  49. target.clearResult();
  50. user._timeHp = 0;
  51. user._timeMp = 0;
  52. </Custom Turn End Effect>
Add Comment
Please, Sign In to add comment