How to make a function run when a choice is selected when the choices were made with javascript?

MinusGix

MinusGix
Member
Joined
Jun 4, 2014
Messages
12
Reaction score
0
Primarily Uses
I have a function that will make a message with choices appear on the screen, but I can't figure out how to run a function/do anything when they are pressed.


Code: 

function runTheNotes(ot){

var oEvent = $gameMap.event(ot.eventId());
var oEventDetail = oEvent.event();
var oNote = oEventDetail.note;
var nNote = JSON.parse(oNote);

console.log(nNote);

$gameMessage.add("What do you do?");
choices = [];
$gameMessage.setChoices(choices, 0);
choices.push("NumberOne");
choices.push("NumberTwo");


}



If anyone knows how/has any ideas they would be very welcome.
 

Latest Threads

Latest Posts

Latest Profile Posts

That moment when you try to figure out a color scheme for an alien ship so that it's something other than "Grey on Grey".
It's up for viewing! See what happened when EquestriAlert got tested in 1997... or was it a test? Did somepony hack the system? Or did somepony push the wrong switch? Even Adagio Dazzle (the owner of the channel) has no clue.

Can you put the pieces together? Don't worry, the game isn't over yet! There's more pieces to add on!
Why parodies are always underrated on your opinion?

Forum statistics

Threads
111,116
Messages
1,058,431
Members
144,334
Latest member
m1sspres1dent
Top