Combine two actors names into one?

Good afternoon all!

I am looking Name 2 Actors Separately and then have a 3rd actor who's name is a combination (string) of the original 2.

Example:

Actor 6 Named: Bob
Actor 7 Named: Joe
Actor 5 Named: Bob & Joe

Screenshot_20221023_075606.png


However Actor 5 is ending up with the default name still. (in this case "Addy and Harper")

I'm currently using this set up but I'm struggling with how to script setting the 3rd name and could use help :


1666644006919.png


Not sure how to go about doing this via script command. Open to common eventing if that's what I need to do as well!


Thanks in advance
setName shouldn't have braces after it, it should have parentheses.
setName($gameVariables.value(6) + " & " + $gameVariables.value(7))

Also, note the space around the and symbol so that it's not all one contiguous blob.

Of course, unless you use them in other places, there's no real purpose in using those two game variables. You're already typing out $gameActors.actor().name, you might as well type that inside of the setName.
Of course, unless you use them in other places, there's no real purpose in using those two game variables. You're already typing out $gameActors.actor().name, you might as well type that inside of the setName.
I figured as much myself. I'm still not getting the name to be changed tho even with the change you suggested. :

$gameParty.members(5).setName(($gameActors.actor(6).name + " & " + $gameActors.actor(7).name)

I'm really struggling with this one sorry >.<
two points:

please add show text showing the actors names before and after your script command, to see what the game really has stored then.

additionally, please give a new screenshot of the event with the current variant of the script functions, and this time please without cutting away the properties as those can effect what happens.
Database Actor Names: Twins is what should be replaced
1666648853630.png

1666648825829.png


1666648886237.png

1666648911691.png

1666649083458.png

1666649096354.png

1666649106354.png

After the scrip in the event the game transfers Actor 5 (the starting actor), In menu:

1666649146614.png


No changes

and this time please without cutting away the properties as those can effect what happens.
Could you expand on this point?
Could you expand on this point?
an event is more than just the content area on the right - the entire left half with its settings and properties, as well as the page numbers on top, are part of the event and define how it behaves.

After the scrip in the event the game transfers Actor 5
but I asked for a show text before AND AFTER the script command. that means you should have entered a show text before the transfer to see if that is the correct result at that time and an event on the next map re-initializes the actor to the default name later.

Because I'm guessing that is the mistake you made: initializing the actor on adding to the party at a later time. "Initializing" means resetting the actor to the original database values and should only be done once at the beginning of the game to define all values - because you'll also loose all experience and equipment on initialization.
an event is more than just the content area on the right - the entire left half with its settings and properties, as well as the page numbers on top, are part of the event and define how it behaves.
What I shared is the only event page, and it auto runs at New Game start. There are no events that initialize the character on the map they are transferred to.
What I shared is the only event page, and it auto runs at New Game start. There are no events that initialize the character on the map they are transferred to.
The script is likely erroring because you have one more opening bracket than you do closing ones. You open it with two braces but only one of them gets closed at the end.
The script is likely erroring because you have one more opening bracket than you do closing ones. You open it with two braces but only one of them gets closed at the end.
I see where the missing parentheses is in the script after the first actor in the string. That would negate the whole script? Idk why I'd think it would crash the game instead.

Going to check the logs next time I run it. Realizing that's the one thing I didn't do that I usually do
I see where the missing parentheses is in the script after the first actor in the string. That would negate the whole script? Idk why I'd think it would crash the game instead.

Going to check the logs next time I run it. Realizing that's the one thing I didn't do that I usually do
I'm honestly not sure why it didn't crash. It did when I tried it.

1666653840799.png


If you're using VisuStella's core plugins, I believe Core Engine catches script errors and just outputs them to console, so that's probably it.
If you're using VisuStella's core plugins, I believe Core Engine catches script errors and just outputs them to console, so that's probably it.
likely the case. It seems the issue is that the wrong Script Call is being used to begin with?

1666654662634.png



updated it to $gameActors.actor(5), and the eror stopped showing, but now :

1666655099855.png


xD. Cant make this stuff up lol


I went back to using Variables and it works now

1666655937742.png


Solved!
likely the case. It seems the issue is that the wrong Script Call is being used to begin with?

View attachment 243506


updated it to $gameActors.actor(5), and the eror stopped showing, but now :

View attachment 243509

xD. Cant make this stuff up lol
I was actually about to say to you that that isn't how the party members work. You want $gameParty.members()[index].name() (name is a function, so what's happening right now is it's showing the function content because you don't have the brackets to actually call it)
$gameParty.members(5).setName...
There's even an additional syntax error here that Trihan didn't explicitly mention (he gave the correct example but didn't point out the error). The members() method does not take an argument, it returns an array you need to specify an index for. This should be $gameParty.members()[5].setName...

If you're going to continue doing some fancier stuff involving script calls, you might want to do a few basic JavaScript tutorials - this was a kind of lengthy thread with a lot of back and forths over a few fundamental syntax errors 😉

Or just be more careful when copying things out of the script call list or whatever you're using for reference.
If you're going to continue doing some fancier stuff involving script calls, you might want to do a few basic JavaScript tutorials - this was a kind of lengthy thread with a lot of back and forths over a few fundamental syntax errors 😉

I'm going to formally ask that if going forward the idea to tell me (or anyone for that matter) to "go do JS tutorials" comes to mind as a response to something you seem "fundamental", just let the thought pass.

There is a really unnecessary tone that a lot of folks on this forum lean harshly into with newer devs that doesn't foster or promote the exact purpose of a forum like this.

Some of us don't have but so many hours in a day to rerun a lot of tuts. And some of us do simply overlook the fundamentals, much like you pointed out for lack of sleep or overall frustration.

Work on this please. Its very discouraging.
I'm going to formally ask that if going forward the idea to tell me (or anyone for that matter) to "go do JS tutorials" comes to mind as a response to something you seem "fundamental", just let the thought pass.
A number of thoughts come to mind, but I'll stick to strict civility.

You are intentionally messing with more advanced functions of RPG Maker - script calls aren't something that are required to make basic games.

Just as I (and almost everyone on this site) would tell any new user to the program to do at least the included tutorials before trying to make a game, it is similarly logical to suggest that someone learn the fundamental syntax of JavaScript if you're going to try to incorporate it to achieve more complicated effects in your game.

There is a really unnecessary tone that a lot of folks on this forum lean harshly into with newer devs that doesn't foster or promote the exact purpose of a forum like this.
I can't speak to what tone you interpret when I have posted however many times over multiple threads to help you, and even indicated goodwill by use of emojis in the post you're referring to.

When you ask for help and have a thread spanning six hours and 13 posts to get all of the answers you needed, and then you have the temerity to go on this rant that my advice to help you have fewer problems sounds condescending to you, that comes off as really entitled.

Some of us don't have but so many hours in a day to rerun a lot of tuts.
We all have but so many hours in a day - what you're basically saying here is that it's okay to ask the other people volunteering to post on these forums to spend their time helping you but it's not okay for you to spend time bettering yourself.

Or even to simply and civilly say, "lol dude, I've done tutorials on the correct syntax for calling functions, I just had a massive brainfart when I wrote this. Thanks anyway."

Work on this please. Its very discouraging.
No, the only thing discouraging here is I'm discouraged from responding to you again.
I'm going to formally ask that if going forward the idea to tell me (or anyone for that matter) to "go do JS tutorials" comes to mind as a response to something you seem "fundamental", just let the thought pass.
Work on this please. Its very discouraging.

I just want to point out that those two quotes demonstrate a very blatant double standard. For some reason, you seem to feel that it's wrong for other people to give you advice on what they think you should work on, but you apparently don't see any problems with yourself telling other people what you think they should work on.

It's also worth pointing out a very important difference between the two scenarios. You created a thread specifically asking for assistance, and he was simply trying to offer that assistance. He didn't insult you or try to put you down--he simply answered your question and then tried to give you advice on how to save yourself the headache of running into similar situations in the future. On the other hand, he didn't attempt to solicit your assistance--you just took it upon yourself to offer him advice on how you think his personality and mannerisms should be (and derailed your own thread in the process)... really, you didn't even offer him advice so much as you tried to straight up dictate how he should conduct himself.

Original thread: https://forums.rpgmakerweb.com/threads/combine-two-actors-names-into-one.152212/