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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top