Setting actor name with a variable

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
I don't think that shortcut works in the change name event command. You might be easier just using a script command with the following

Code:
$gameActors.actor(id).setName($gameVariables.value(x))
Where:
id = the id of the actor whose name you're changing
x = the variable that the new name is stored to
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
I don't think that shortcut works in the change name event command. You might be easier just using a script command with the following

Code:
$gameActors.actor(id).setName($gameVariables.value(x))
Where:
id = the id of the actor whose name you're changing
x = the variable that the new name is stored to
Seems like a better way of doing it, I'll give that a try and see if it works
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
Something still seems to be up, it might just be the plugin I'm not sure
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
You'll have to explain what the problem is, and we might be able to solve it.
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
You'll have to explain what the problem is, and we might be able to solve it.
So basically the plugin is meant to saving the random name from whatever list I've put using this plugin command:
RANDOMNAME
  • [variable #]

    So I used the script calls to then set the actor name to the variable the name from the list has gone into but the name doesn't change.
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
So basically the plugin is meant to saving the random name from whatever list I've put using this plugin command:
RANDOMNAME
  • [variable #]

    So I used the script calls to then set the actor name to the variable the name from the list has gone into but the name doesn't change.
RANDOMNAME [/list/] [variable #] list without the slashes, they're just there because of the code on the site
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
I haven't downloaded the plugin, nor am I 100% sure how you're actually using the plugin command. I presume you're trying to get a name from list1 so I'd guess your command should look like this if you're setting variable number 1

Code:
RANDOMNAME list1 1
Is this what you're doing?

It might be worth checking the value of the variable you're meant to be assigning to by using show text to make sure the variable is actually being assigned something.
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
Yeah just tried displaying the variables but they're still showing as 0 for some reason
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
I don't think the square brackets are necessary, nor is the word variable. Try replacing your plugin commands with these

Code:
RANDOMNAME list1 3

RANDOMNAME list3 50

//and so on
It's also worth noting that most plugins will force your plugin commands to either upper or lower case to make sure it doesn't matter how you capitalise things, however, there appears to be no such thing in this one so you'll need to make sure you're copying the names of any lists exactly as they are set up. For instance LIST1 is not the same as list1 or List1.
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
I don't think the square brackets are necessary, nor is the word variable. Try replacing your plugin commands with these

Code:
RANDOMNAME list1 3

RANDOMNAME list3 50

//and so on
It's also worth noting that most plugins will force your plugin commands to either upper or lower case to make sure it doesn't matter how you capitalise things, however, there appears to be no such thing in this one so you'll need to make sure you're copying the names of any lists exactly as they are set up. For instance LIST1 is not the same as list1 or List1.
The brackets seem to be in the instructions but I'll take out the word variable and see and then if not, I'll try removing the brackets
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
When I remove the word variable, it comes up with: "TypeError Cannot read property 'split' of undefined"
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
Have you used the plugin command exactly as I provided? Please try using this Exact plugin command:

Code:
RANDOMNAME list1 3
I've tested it - it works.
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
Have you used the plugin command exactly as I provided? Please try using this Exact plugin command:

Code:
RANDOMNAME list1 3
I've tested it - it works.
Alright I'll try it without the brackets and see, if not maybe I've just messed up the plugin when I added extra lists or something
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
It's still giving me the "Cannot read property 'split' of undefined"
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
I imagine the error is being caused by the name list argument being incorrect. I note in your earlier screenshot that you're trying to use list66 and list68 - these do not exist naturally, so unless your running a script to push them into the parameters they won't work, and will cause this issue. I would advise removing them for the purposes of testing this.

If it still doesn't work can you provide a screenshot of your plugin command?
 

Bumblefish97

Veteran
Veteran
Joined
Jul 3, 2015
Messages
62
Reaction score
10
First Language
English
Primarily Uses
I imagine the error is being caused by the name list argument being incorrect. I note in your earlier screenshot that you're trying to use list66 and list68 - these do not exist naturally, so unless your running a script to push them into the parameters they won't work, and will cause this issue. I would advise removing them for the purposes of testing this.

If it still doesn't work can you provide a screenshot of your plugin command?
The plugin said I could add extra lists which I did in the base script and they seemed to look alright but maybe not, I'll get a screenshot of how the command looks now
 

Silva

Scoobityboo
Veteran
Joined
Nov 5, 2018
Messages
394
Reaction score
212
First Language
English
Primarily Uses
RMMV
Like I said earlier you have to make sure that where there are no capitals in the list's name originally there are none when you use the plugin command. You have used a capital "L" on both plugin commands which means the plugin is looking for something that doesn't exist. Replace the capital "L" with a lower case "l" and that should solve the problem.

The plugin allows you to use notetags to define lists for specific actors or enemies, not new global lists. To make new global lists would require you to add additional plugin parameters by editing the plugins base code.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Me : "Wearing glasses is annoying."
*put out glasses*
Also me : "Keep mistaking 0, 6 and 8."
oh god, a new version of RPG Maker is coming soon already....
So a new RPG Maker has been teased on RPG Maker Web's Twitter. Hmm...
So in my stream for the No Travel Game Jam, I mentioned we were going to do a teaching make a game from beginning to end series of streams, but it had to wait on an announcement I couldn't make yet before I could start... Keep your eyes on our twitter tonight.
Surprise extra Text Adventure session! Feel free to drop by!

Forum statistics

Threads
98,121
Messages
949,432
Members
129,398
Latest member
pfirrsich
Top