MP and Transformations

Need some help here guys lol

I want my char to transform when the MP is 100%, and after that the MP will decrease, and when reach 0%, i want my char to his normal state.
(detrasnformed)

Basically, i want him to transform with 100% mp, and mp decrease and he detrasnform when mp reach 0%.

Thanks
 
Hmm... I can't recall if I've ever shared scripts for this before or not

Anyways, for transform when MP is 100%, here's the script :
Code:
anim	idle
@script
    void self = getlocalvar("self");
    int MMP = getentityproperty(self,"maxmp");
    int MP = getentityproperty(self,"mp");

    if(frame>1 && MP==MMP){
      performattack(self, openborconstant("ANI_FOLLOW1"));
    }
@end_script
...

When MP reaches maximum value, character will perform FOLLOW1. In FOLLOW1, there's animation with weaponframe command to do the transformation

For detransform when MP is 0:
Code:
anim	idle
@script
    void self = getlocalvar("self");
    int MP = getentityproperty(self,"mp");

    if(frame>1 && MP==0){
      performattack(self, openborconstant("ANI_FOLLOW1"));
    }
@end_script

Same as before, FOLLOW1 is animation with weaponframe to detransform

Those scripts can be declared in WALK animation too but you'd need to stop movement to prevent moving while transforming

HTH
 
Back
Top Bottom