For example, if I want to show the party's gold I can use $ gameParty._gold, and to show actor 1's level for example, how do I do it?
How can I show the actor's level by script?
RPG Maker MV SupportWhy not just use variables instead?
When controlling variables, you can choose to use game data to store in the variable.
You can choose any actors level, parameters and also the gold of the party.
Edit: if you really want to the scripting way anyways,
you can try:
$gameActors.actor(X).level
X is the ID of the actor.
When controlling variables, you can choose to use game data to store in the variable.
You can choose any actors level, parameters and also the gold of the party.
Edit: if you really want to the scripting way anyways,
you can try:
$gameActors.actor(X).level
X is the ID of the actor.
The Scriptcalls i used for the SRD HudMaker
(Setup Example for Actor 1)
Hud Maker weblink
.. i copy pasted this from the bottom of my signature spoiler , incase you asked for the Script in order to use it in the SRD Hud Maker
(Setup Example for Actor 1)
Actor current HP:
Actor Max HP:
Actor current MP:
Actor Max MP:
Actor current TP:
Actor current LV:
Actor Name:
Actor Total current EXP:
Actor current LV EXP:
Actor Max EXP of current LV:
Actor EXP to Next LV (=> Actor Max EXP of current LV - Actor current LV EXP):
Needed in Text HUD in order to use script code where X is:
Script code to put in "Condition" :
For switches:
For variables:
Script code for Variable (this one is Variable "50" )
Code:
$gameActors.actor(1).hp
Actor Max HP:
Code:
$gameActors.actor(1).mhp
Actor current MP:
Code:
$gameActors.actor(1).mp
Actor Max MP:
Code:
$gameActors.actor(1).mmp
Actor current TP:
Code:
$gameActors.actor (1).tp
Actor current LV:
Code:
$gameActors.actor(1).level
Actor Name:
Code:
$gameActors.actor(1).name()
Actor Total current EXP:
Code:
$gameActors.actor(1).currentExp()
Actor current LV EXP:
Code:
Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp())
Actor Max EXP of current LV:
Code:
Math.abs($gameActors.actor(1).nextRequiredExp()) + Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp())
Actor EXP to Next LV (=> Actor Max EXP of current LV - Actor current LV EXP):
Code:
Math.abs($gameActors.actor(1).nextRequiredExp()) + Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp()) - Math.abs($gameActors.actor(1).expForLevel($gameActors.actor(1).level) - $gameActors.actor(1).currentExp())
Needed in Text HUD in order to use script code where X is:
Code:
${X}
Script code to put in "Condition" :
For switches:
Code:
$gameSwitches.value(x) == true
Code:
For variables: $gameVariables.value(x) == n
Script code for Variable (this one is Variable "50" )
Code:
$gameVariables.value(50)
Hud Maker weblink
.. i copy pasted this from the bottom of my signature spoiler , incase you asked for the Script in order to use it in the SRD Hud Maker
ScorchedGround and Dopan, thanks for the help, I managed to make it work ^^
Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-show-the-actors-level-by-script.129865/