Yes I know, but it 's another Tips and Tricks, how do I combine both in one status ???
Just have the notetags of both states in the one state (dunno if that makes sense) So here's the code:
Spoiler
<Custom Passive Condition>
// Check if the party is in battle.
if ($gameParty.inBattle()) {
// Default the user's trance state to false.
user._trance = user._trance || false;
// Sets the condition for the user to be either in the trance state or if the user's TP matches the user's MaxTP.
condition = user._trance || user.tp === user.maxTp();
} else {
// Otherwise, the condition is false.
condition = false;
}
// If the condition passes...
if (condition) {
// And if the user isn't in the trance state...
if (!user._trance) {
// Then play an animation as the user enters trance.
user.startAnimation(120);
}
// Set the user's trance state to true.
user._trance = true;
}
</Custom Passive Condition>
<Custom Regenerate Effect>
// Set the TP drain amount.
var tp = 10;
// Reduce the user's TP.
user.gainTp(-tp);
// If the user's TP is 0...
if (user.tp === 0) {
// ...then turn off trance.
user._trance = false;
}
<Custom Regenerate Effect>
// Check if the party is in battle.
if ($gameParty.inBattle()) {
// Default the user's trance state to false.
user._trance = user._trance || false;
// Sets the condition for the user to be either in the trance state or if the user's TP matches the user's MaxTP.
condition = user._trance || user.tp === user.maxTp();
} else {
// Otherwise, the condition is false.
condition = false;
}
// If the condition passes...
if (condition) {
// And if the user isn't in the trance state...
if (!user._trance) {
// Then play an animation as the user enters trance.
user.startAnimation(120);
}
// Set the user's trance state to true.
user._trance = true;
}
</Custom Passive Condition>
<Custom Regenerate Effect>
// Set the TP drain amount.
var tp = 10;
// Reduce the user's TP.
user.gainTp(-tp);
// If the user's TP is 0...
if (user.tp === 0) {
// ...then turn off trance.
user._trance = false;
}
<Custom Regenerate Effect>
Code:
<Custom Apply Effect>
// Check if user is an actor.
if (user.isActor()) {
// Archive the previous settings.
user._prevCharName = user._prevCharName || user._characterName;
user._prevCharIndex = user._prevCharIndex || user._characterIndex;
user._prevFaceName = user._prevFaceName || user._faceName;
user._prevFaceIndex = user._prevFaceIndex || user._faceIndex;
user._prevBattlerName = user._prevBattlerName || user._battlerName;
// Check if the actor ID is 1.
if (user.actorId() === [COLOR=rgb(255,0,0)]1[/COLOR]) {
// The filename of the character graphic without the file extension.
var charName = '[COLOR=rgb(255,0,0)]HaroldSSJ[/COLOR]';
// The index of the character graphic used.
var charIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the face graphic without the file extension.
var faceName = '[COLOR=rgb(255,0,0)]HaroldSSJ[/COLOR]';
// The index of of the face graphic used.
var faceIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the battler graphic without the file extension.
var battlerName = '[COLOR=rgb(255,0,0)]Harold_SSJ1[/COLOR]';
// Check if the actor ID is 2.
} else if (user.actorId() === [COLOR=rgb(255,0,0)]2[/COLOR]) {
// The filename of the character graphic without the file extension.
var charName = '[COLOR=rgb(255,0,0)]ThereseSSJ[/COLOR]';
// The index of the character graphic used.
var charIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the face graphic without the file extension.
var faceName = '[COLOR=rgb(255,0,0)]ThereseSSJ[/COLOR]';
// The index of of the face graphic used.
var faceIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the battler graphic without the file extension.
var battlerName = '[COLOR=rgb(255,0,0)]Therese_SSJ1[/COLOR]';
// Check if the actor ID is 3.
} else if (user.actorId() === [COLOR=rgb(255,0,0)]3[/COLOR]) {
// The filename of the character graphic without the file extension.
var charName = '[COLOR=rgb(255,0,0)]MarshaSSJ[/COLOR]';
// The index of the character graphic used.
var charIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the face graphic without the file extension.
var faceName = '[COLOR=rgb(255,0,0)]MarshaSSJ[/COLOR]';
// The index of of the face graphic used.
var faceIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the battler graphic without the file extension.
var battlerName = '[COLOR=rgb(255,0,0)]Marsha_SSJ1[/COLOR]';
// Check if the actor ID is 4.
} else if (user.actorId() === [COLOR=rgb(255,0,0)]4[/COLOR]) {
// The filename of the character graphic without the file extension.
var charName = '[COLOR=rgb(255,0,0)]LuciusSSJ[/COLOR]';
// The index of the character graphic used.
var charIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the face graphic without the file extension.
var faceName = '[COLOR=rgb(255,0,0)]LuciusSSJ[/COLOR]';
// The index of of the face graphic used.
var faceIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the battler graphic without the file extension.
var battlerName = '[COLOR=rgb(255,0,0)]Lucius_SSJ1[/COLOR]';
// If none of the above actor ID's match, use this setting.
} else {
// The filename of the character graphic without the file extension.
var charName = '[COLOR=rgb(255,0,0)]HaroldSSJ[/COLOR]';
// The index of the character graphic used.
var charIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the face graphic without the file extension.
var faceName = '[COLOR=rgb(255,0,0)]HaroldSSJ[/COLOR]';
// The index of of the face graphic used.
var faceIndex = [COLOR=rgb(255,0,0)]0[/COLOR];
// The filename of the battler graphic without the file extension.
var battlerName = '[COLOR=rgb(255,0,0)]Harold_SSJ1[/COLOR]';
}
// Changes the character image to the setting applied from above.
user.setCharacterImage(charName, charIndex);
// Changes the face image to the setting applied from above.
user.setFaceImage(faceName, faceIndex);
// Changes the battler image from the setting applied from above.
user.setBattlerImage(battlerName);
// Refreshes the user's appearance.
user.refresh();
}
</Custom Apply Effect>
<Custom Remove Effect>
// Retrieve archived settings.
var charName = user._prevCharName;
var charIndex = user._prevCharIndex;
var faceName = user._prevFaceName;
var faceIndex = user._prevFaceIndex;
var battlerName = user._prevBattlerName;
// Changes the character image to the archived setting.
user.setCharacterImage(charName, charIndex);
// Changes the face image to the archived setting.
user.setFaceImage(faceName, faceIndex);
// Changes the battler image from the archived setting.
user.setBattlerImage(battlerName);
// Clear archived data.
user._priorityCharacterName = undefined;
user._priorityCharacterIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityFaceName = undefined;
user._priorityFaceIndex = undefined;
user._prevFaceName = undefined;
user._prevFaceIndex = undefined;
user._priorityBattlerName = undefined;
user._prevBattlerName = undefined;
// Refreshes the user's appearance.
user.refresh();
</Custom Remove Effect>Just copy and paste all of the above into the state notetag :D