I have been trying to add variety to my NPC dialogue using the following RPG Maker MZ Tutorial:
Random NPC Dialogue - the 4th method "Use script calls to simplify random dialogue removal"
I have copied the event and script from the tutorial line by line.
In my game, the NPC returns the number 4 in the text box so I redid everything and it still does the same.
To test the script I started a new blank project and created an NPC for the player to talk to, in this clean "build" I do not get the number 4, but the error:
TypeError
$gameVariables.value(...).splice is not a function
Which is equally baffling as in my game build I get a random number thrown back at me.
Here are my Events:
And I have variable 5 set up as:
Is there something I am doing wrong?
Random NPC Dialogue - the 4th method "Use script calls to simplify random dialogue removal"
I have copied the event and script from the tutorial line by line.
In my game, the NPC returns the number 4 in the text box so I redid everything and it still does the same.
To test the script I started a new blank project and created an NPC for the player to talk to, in this clean "build" I do not get the number 4, but the error:
TypeError
$gameVariables.value(...).splice is not a function
Which is equally baffling as in my game build I get a random number thrown back at me.
Here are my Events:
And I have variable 5 set up as:
Is there something I am doing wrong?