- Joined
- Jan 26, 2014
- Messages
- 1,281
- Reaction score
- 106
- First Language
- Irish
- Primarily Uses
- N/A
So, I am writing a plugin and it goes this way:
var gtemp_alias = Game_Temp.prototype.initialize;var scene_map_update = Scene_Map.prototype.update;var scene_battle_update = Scene_Battle.prototype.update;var pause_on_map = true;var pause_on_battle = true;var pause;function update_pause() { update_pause_execution(); update_pause_button();}function update_pause_execution() { if (!$gameTemp.pause) { return; } while(!$gameTemp.pause) { update_pauseX(); Input.update(); TouchInput.update(); Graphics.update(); }}function update_pauseX() { update_pause_button();}function check_pause() { if ($gameTemp.pause == true) { $gameTemp.pause = false; } else { $gameTemp.pause = true; } }function update_pause_button() { if (Input.isTriggered('shift')) { check_pause(); }}Game_Temp.prototype.initialize = function() { gtemp_alias.call(this); pause = false;};Scene_Map.prototype.update = function() { scene_map_update.call(this); if (pause_on_map) { update_pause(); }};Scene_Battle.prototype.update = function() { scene_battle_update.call(this); update_pause();};Question: Why does it not do anything, and why doesn't it pause like it should? Also, how can you do CTRL and F1 - F12 in the Input.isTriggered correctly?
var gtemp_alias = Game_Temp.prototype.initialize;var scene_map_update = Scene_Map.prototype.update;var scene_battle_update = Scene_Battle.prototype.update;var pause_on_map = true;var pause_on_battle = true;var pause;function update_pause() { update_pause_execution(); update_pause_button();}function update_pause_execution() { if (!$gameTemp.pause) { return; } while(!$gameTemp.pause) { update_pauseX(); Input.update(); TouchInput.update(); Graphics.update(); }}function update_pauseX() { update_pause_button();}function check_pause() { if ($gameTemp.pause == true) { $gameTemp.pause = false; } else { $gameTemp.pause = true; } }function update_pause_button() { if (Input.isTriggered('shift')) { check_pause(); }}Game_Temp.prototype.initialize = function() { gtemp_alias.call(this); pause = false;};Scene_Map.prototype.update = function() { scene_map_update.call(this); if (pause_on_map) { update_pause(); }};Scene_Battle.prototype.update = function() { scene_battle_update.call(this); update_pause();};Question: Why does it not do anything, and why doesn't it pause like it should? Also, how can you do CTRL and F1 - F12 in the Input.isTriggered correctly?

