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
350
Reaction score
114
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

Where do i have to play Heisei Pistol Show the same creator that made Re: Kinder Parun
I really get the feeling I should be doing regular YouTube videos whenever I make something cool in my game, instead of waiting for massive changes. But not going to lie... I always feel like it's never quite enough to merit an update, until it's a drastic change. :kaoswt:
Going to submit to this game jam...struggling with the time crunch...
Have to keep compromising...
Just released a new OST for my game and a new place to purchase it!

Ah, things to do when you finish a game.
Ami
Me: It's dark cloudy! I hope it's Rain…
(2-3 Hours Later,Changed To Sunny)
Me: :kaolivid:

Forum statistics

Threads
104,540
Messages
1,007,017
Members
136,034
Latest member
WhatisGachi
Top