Hi folks,
I am trying to create a script which lets the player select an item, converts the item ID to the name string, checks the string, and if it matches the required value, shows some dialogue.
Here is my event:
I am having a few problems, though.
The first is that I want to show one message, then another message. Using "$gameMessage.add" seems to just keep adding to the current message. I checked the script call reference doc and couldn't find any way to start a new message.
The second and much more confusing issue is that, as you can see in the image, there are a few basic common events set to run before and after this script. The ones before just zoom in the game screen and show an image, and the ones after zoom it back out and clear that image.
For some reason, ALL of the common events run before this script, even though it is between them. The game lets me select an item, zooms in and shows the image, immediately zooms out and clears the image, and then shows the message in my script, which is between them.
Replacing my script with a typical "show text" command works properly - the zoom in and image happen, the text shows, and then it zooms back out and clears the image when the message is closed. I have no clue how things are running out of sequence when it is in a script. I have tried copying this to other events, and it always works the same way - the script runs after all the common events. Strangely, if I add regular "show text" command after my script, it will run everything correctly - zoom, then script text, then command text, then zoom out.
Any help is much appreciated!
I am trying to create a script which lets the player select an item, converts the item ID to the name string, checks the string, and if it matches the required value, shows some dialogue.
Here is my event:
I am having a few problems, though.
The first is that I want to show one message, then another message. Using "$gameMessage.add" seems to just keep adding to the current message. I checked the script call reference doc and couldn't find any way to start a new message.
The second and much more confusing issue is that, as you can see in the image, there are a few basic common events set to run before and after this script. The ones before just zoom in the game screen and show an image, and the ones after zoom it back out and clear that image.
For some reason, ALL of the common events run before this script, even though it is between them. The game lets me select an item, zooms in and shows the image, immediately zooms out and clears the image, and then shows the message in my script, which is between them.
Replacing my script with a typical "show text" command works properly - the zoom in and image happen, the text shows, and then it zooms back out and clears the image when the message is closed. I have no clue how things are running out of sequence when it is in a script. I have tried copying this to other events, and it always works the same way - the script runs after all the common events. Strangely, if I add regular "show text" command after my script, it will run everything correctly - zoom, then script text, then command text, then zoom out.
Any help is much appreciated!