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

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
57
Reaction score
9
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
354
Reaction score
115
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
240
Reaction score
212
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
57
Reaction score
9
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
57
Reaction score
9
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 Profile Posts

Less than a week and I can move into my new apartment and out of this bad situation. I'm so excited! Then game making power will increase. :kaoluv:
Enter the password in letters. (English subtitles)
I really tried to pull off something for halloween, but I don't feel like going on. I feel like the plot I was building was too generic, and I couldn't connect to it as I do with other projects. On the bright side, I've been working on my cosmic-puzzle project, so far I think the core mechanics are working properly, so I'll be creating some large test maps to see how it works out.
People2_5 & SF_Monster1 added!

Ami
--- X Costume ---

M.Healer: I'm wearing M.Mage's Costume.
M.Mage: I'm wearing M.Healer's Costume.
M.Knight: Why not using the Scary Costume like me,The Scary Frankenstein?
M.Healer: Err…Because we have low of Budget.
M.Mage: Yeah,right.

Forum statistics

Threads
104,602
Messages
1,007,487
Members
136,084
Latest member
TikeTenGamesOffical
Top