- Joined
- Mar 9, 2016
- Messages
- 421
- Reaction score
- 110
- First Language
- English
- Primarily Uses
Good evening...
I have the following Script triggered in an Event, which works...
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...
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.
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...'")
: :$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...'");}
: :});
◆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.
