GaBoTiCo
Active member
O Ilusionista said:Ah its easy - you can either use this as a function in your animation script
Code:void mpcost( int MCost) {// Spend some life void self = getlocalvar("self"); void MPower = getentityproperty(self,"mp"); //get mp changeentityproperty(self, "mp", MPower-MCost);//consume mp }
Or even inline
Code:@script void self = getlocalvar("self"); void MPower = getentityproperty(self,"mp"); //get mp changeentityproperty(self, "mp", MPower-10);//consume 10 mp @end_script
Thanks a lot! I used a similar script that Bloodbane gave me and it worked. But for some reason in my Ranma MOD, just by using "energycost" and "mponly" was enough for the MP bar to be drained. I wonder if it's because I'm using a different OpenBOR version. Also, what happens if the animation drains some MP on its own, and then the Player hits an enemy? Will the MP bar get drained twice?