I cannot figure out how to change these notetags into something that will
--------------------------------------------------------------------------------------------
edit: So I managed it somewhat, but it doesn't always add replace the state, sometimes it just removes it and leaves them with no state at all.
also I can't figure out how to add a wait time for the animation to finish
- Give a random state out of a group of states to the actor when they reach max tp
- Reduce said actors tp to zero
- Remove the previous state and add a new one when they reach max tp again
--------------------------------------------------------------------------------------------
edit: So I managed it somewhat, but it doesn't always add replace the state, sometimes it just removes it and leaves them with no state at all.
Code:
<Custom Turn Start Effect>
if (user.tp>=100) {
user.removeState(32);
user.removeState(33);
user.removeState(34);
user.removeState(35);
user.startAnimation(123);
var rr = Math.floor(Math.random() * 4);
if(rr==1){
user.addState(32);
}else if(rr==2){
user.addState(33);
}else if(rr==3){
user.addState(34);
}else{
user.addState(35);
}
user.gainTp(-100);
}
</Custom Turn Start Effect>
also I can't figure out how to add a wait time for the animation to finish