I'm trying to create a show choice plugin that changes a variable depending on which choice is highlighted.
The closest thing I've found was Galv's Choice Pictures, which makes a different picture appear depending on which choice is highlighted. I tried to do some tampering with it but I can't get it to actually affect the variable. Does anybody know a workaround?
[EDIT] Solved.
In the Galv_PictureChoices.js I added $gameVariables.setValue(obj.x, obj.y); underneath the line Galv.CPICS.showPic = function(obj) {
Setting the variables to obj.x, obj.y means that whenever I add <p:imageName,x,y> to the choice display options, it'll refresh variable x to value y in real time! I took out the code that made the picture appear. I don't plan to use the plugin for its intended purpose so it works for me!
The closest thing I've found was Galv's Choice Pictures, which makes a different picture appear depending on which choice is highlighted. I tried to do some tampering with it but I can't get it to actually affect the variable. Does anybody know a workaround?
[EDIT] Solved.
In the Galv_PictureChoices.js I added $gameVariables.setValue(obj.x, obj.y); underneath the line Galv.CPICS.showPic = function(obj) {
Setting the variables to obj.x, obj.y means that whenever I add <p:imageName,x,y> to the choice display options, it'll refresh variable x to value y in real time! I took out the code that made the picture appear. I don't plan to use the plugin for its intended purpose so it works for me!