RPG Maker Forums

Good evening...


I have the following Script triggered in an Event, which works...

◆Script:$gameMessage.setFaceImage('Actor1',0)     
:      :$gameMessage.setBackground(0)
:      :$gameMessage.setPositionType(2)                   
:      :$gameMessage.add(" Player chose 'Hmm...'")

When  trigger this, I get a Message Box with the Text in it. Good.


I would like to have the same result as part of a Script triggered in an Event, but subject to a Condition. Here's what I have...

◆Script:$gameMap._interpreter.setupChoices([['Yes', 'No', 'Perhaps', 'Certainly', 'Never..!', 'What..?', 'Dunno', 'Hmm...'], 1]);
◆Script:$gameMessage.setChoiceCallback(function(responseIndex) {
:      :  if (responseIndex === 0) {$gameTemp.reserveCommonEvent(28);}if (responseIndex === 1) {$gameTemp.reserveCommonEvent(29);}
:      :  if (responseIndex === 2) {$gameTemp.reserveCommonEvent(30);}if (responseIndex === 3) {$gameTemp.reserveCommonEvent(31);}
:      :  if (responseIndex === 4) {$gameTemp.reserveCommonEvent(32);}if (responseIndex === 5) {$gameTemp.reserveCommonEvent(33);}
:      :  if (responseIndex === 6) {$gameTemp.reserveCommonEvent(34);}
:      :  if (responseIndex === 7) {$gameMessage.setFaceImage('Actor1',0);     
:      :$gameMessage.setBackground(0);
:      :$gameMessage.setPositionType(2);
:      :$gameMessage.add(" Player chose 'Hmm...'");}
:      :});

The first seven choices work,by calling a Common Event each. It's the last one that I can't get to work. If I have it call a Common Event like the others, it works fine. How, though, to have the Message Box directly in the Script, without calling a Common Event..? With the Script above, there is no error flagged, but no Message Box, either.


Thanks in advance for pointing me in the right direction.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,038
Messages
1,018,466
Members
137,821
Latest member
Capterson
Top