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

alphawiz

Veteran
Veteran
Joined
Feb 8, 2017
Messages
56
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
341
Reaction score
104
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
56
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
56
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 Posts

Latest Profile Posts

I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.
Finally finished my menu redesign after like a month of coding! I hate designing menus... Good news though - I thought of a complete redesign for it now, so yay...
Still no scam calls all day... also I got a quick gig designing a mascot drawing for a small business, so I might actually make some green of my own after all. That would be a perfect job for me, since I love art and digital design.

Forum statistics

Threads
104,388
Messages
1,006,031
Members
135,917
Latest member
kingrifer
Top