I'm trying to use a small custom plug-in to hold all the data for small dating sim elements from the game. But for some reason the function will not work when called through the code. I have, scrubbed everything and rewritten it like 5 times and it just will not do anything. There's no error or crash, it just won't do anything and the game plays the rest of the events as if it wasn't there.
I've called it in both a common event and in normal events as: supdan.datingSimFunction.datingSimElements();
perviously I've called it as datingSimElements(); and supdan.datingSimFunction.datingSimElements() neither of which have worked either. Please tell me if I missed something super obvious, ty.
var supdan = supdan || {};
supdan.datingSimFunction = supdan.datingSimFunction || {};
(function($) {
$.datingSimElements = function() {
if (($gameVariables.value(1) == 1) && ($gameSwitch.value(101) == false)) {
$gamePlayer.reserveTransfer(Map005, 0, 0, 0, 0);
}
else if (($gameVariables.value(2) == 1) && ($gameSwitch.value(121) == false)) {
$gamePlayer.reserveTransfer(Map006, 0, 0, 0, 0);
}
else if (($gameVariables.value(3) == 1) && ($gameSwitch.value(141) == false)) {
$gamePlayer.reserveTransfer(Map007, 0, 0, 0, 0);
}
else if (($gameVariables.value(4) == 1) && ($gameSwitch.value(161) == false)) {
$gamePlayer.reserveTransfer(Map008, 0, 0, 0, 0);
}
else if (($gameVariables.value(5) == 1) && ($gameSwitch.value(181) == false)) {
$gamePlayer.reserveTransfer(Map009, 0, 0, 0, 0);
}
else if (($gameVariables.value(6) == 1) && ($gameSwitch.value(201) == false)) {
$gamePlayer.reserveTransfer(Map010, 0, 0, 0, 0);
}
else {
// bounces to the saved area once there are no dating scenes left to call to.
$gameTemp.reserveCommonEvent(3);
}
};
}) (supdan.datingSimFunction);
I've called it in both a common event and in normal events as: supdan.datingSimFunction.datingSimElements();
perviously I've called it as datingSimElements(); and supdan.datingSimFunction.datingSimElements() neither of which have worked either. Please tell me if I missed something super obvious, ty.