RMMV Returning a state's and item's name or ID number

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
67
Reaction score
10
First Language
English
Primarily Uses
RMMV
Here's my situation - I'm using SumRndmDde's Hud Maker and want to have a picture to display the current state of the player as well as the current Weapon in use. Since there is apparently no way to assign a string value to a Control Variable, I'm at something of a loss as to how to proceed.

Is there a way to reference a state's name or id number? If I can get some kind of value returned, I can easily name my picture files to match. Same with the Weapon name or ID.

I'm not sure if I'm looking for plugin help or javascript help. I've already posted my questions on SumRndmDde's discord and ******* pages but I'm also looking for the answer to a script question to find a way to return the necessary values I need. Although if anybody knows of a plugin that can help return those values in such a way that they could be called from a Hud Maker Picture EX EVAL, I'd be grateful for that help too.

Bottom line - I just want to be able to accomplish being able to use a state and weapon image in my HUD and be able to automatically change it when those values change.
 
Last edited:

Dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
514
Reaction score
242
First Language
German
Primarily Uses
RMMV
Code:
$gameActors.actor(1).isStateAffected(1)
this will return true or false in console f8 depending of if actor1 is state affected with state 1

if that doesnt work for the hudmaker u could also try "if condition" in addition..

if u open the console with F8 and write :
Code:
$gameActors.actor(1)
in the console and enter ,you will get a lot of info what else can be made with $gameActors.actor(1) .. the state affected part is nearly at the end in the " __proto__: " part..
Screenshot_1.png

you should be able to find out the weapon part in a similar way or with searching in the forum for the script about used weapons..
(sry i got no better idea on this part)

Edit
In my signature spoiler at the bottom, is a list for hudmaker script input based on Actor id.
(but its about hp,mp,ep,name,lv.. ect not weapons or states ,because i didnt needed that in my case)
Example Huds Img:
View attachment 147006
This can be helpfull aswell:
Usefull Scriptcalls Info (Page is not made by me)
alternative Scriptcall List (Page is not made by me)
 
Last edited:

SeaPhoenix

Veteran
Veteran
Joined
May 14, 2015
Messages
251
Reaction score
232
First Language
English
Primarily Uses
RMMV
Since there is apparently no way to assign a string value to a Control Variable, I'm at something of a loss as to how to proceed.
By the way, you can set a variable to a string using quotation marks:

Hello.png

Or you can use the script call
Code:
$gameVariables.setValue(1, "Hello")
If your string is more than one word, just enclose everything within the quotation marks, e.g., "Hello, it's me".
 

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
67
Reaction score
10
First Language
English
Primarily Uses
RMMV
By the way, you can set a variable to a string using quotation marks:


Or you can use the script call
Code:
$gameVariables.setValue(1, "Hello")
If your string is more than one word, just enclose everything within the quotation marks, e.g., "Hello, it's me".
This is EXACTLY what I was hoping for because now I can simply set the name of the picture when the state changes, and the same with the weapon in a common event, and simply refer to that variable in Hud Maker.

Thank you so much!
 

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
67
Reaction score
10
First Language
English
Primarily Uses
RMMV
@Dopan Thank you. While this isn't what I was looking for, the wheels are already turning on how I can use this information now and in the future.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,585
Latest member
Reversinator
Top