GolvaeGames

Veteran
Veteran
Joined
Dec 15, 2014
Messages
140
Reaction score
85
First Language
English
Primarily Uses
RMMV
I cannot figure out how to change these notetags into something that will
  • 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
here is the thread with the notetag in question - [SOLVED] Give a Random State
--------------------------------------------------------------------------------------------
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
 
Last edited:

GolvaeGames

Veteran
Veteran
Joined
Dec 15, 2014
Messages
140
Reaction score
85
First Language
English
Primarily Uses
RMMV
This one made it work
Code:
<Custom Turn Start Effect>
if (user.tp>=100) {
user.startAnimation(124);
var rr = Math.floor(Math.random() * 4) + 1;
switch(rr){
case 1:
user.addState(32);user.removeState(33);user.removeState(34);user.removeState(35);
break;
case 2:
user.addState(33);user.removeState(32);user.removeState(34);user.removeState(35);
break;
case 3:
user.addState(34);user.removeState(33);user.removeState(32);user.removeState(35);
break;
case 4:
user.addState(35);user.removeState(33);user.removeState(34);user.removeState(32);
}
user.gainTp(-100);
}
</Custom Turn Start Effect>
 

Latest Threads

Latest Posts

Latest Profile Posts

I typically ask this on my normal social media channels, but figured there may be good replies here. Anyone got any good horror movie recommendations? I've seen a lot, but I always love getting suggestions! Bonus points if you know which service it is streaming on (in the US) - bring on the spOoooOky!
 After a few distractions (and my annual rough second week of October), I’m getting back on track with my OMGC project.
 Am I overcomplicating it? Yes. Am I going to tone it down? Almost certainly not.
 At least the dialogue stuff is almost done. I need to do the map itself, and then all that’s left is combat.
 Getting there!
Creating 3D CGs for Cutscenes. :kaosalute:

I keep wanting to post every song I make for the game and have to hold back on that because at this rate, I'll have spoiled all the really good stuff lol..

Forum statistics

Threads
115,903
Messages
1,093,847
Members
151,154
Latest member
SwagTorchic
Top