- Joined
- Jan 26, 2014
- Messages
- 1,281
- Reaction score
- 106
- First Language
- Irish
- Primarily Uses
- N/A
I am manually using TouchInput for a custom image, where if I click that custom image, it would select that image with a certain command. Here's how I did it:
if(TouchInput.isTriggered() && TouchInput._x > Graphics.width / 2 - 100 && TouchInput._x < Graphics.width / 2 + 100 && TouchInput._y > 440 && TouchInput._y < 480) { SoundManager.playCursor(); this._commandWindow._index = 0; }However, when say I do this:
if(TouchInput.isTriggered() && TouchInput._x > Graphics.width / 2 - 100 && TouchInput._x < Graphics.width / 2 + 100 && TouchInput._y > 440 && TouchInput._y < 480) { SoundManager.playCursor(); this._commandWindow._index = 0; DataManager.setupNewGame(); this._commandWindow.close(); this.fadeOutAll(); SceneManager.goto(Scene_Map); }we all know that when you click the image, it directly puts you on the new game and transfer you on map. Note that I hid the title command and placed them somewhere else, and an image represents them. However, in a normal command, we select the command first, click it again before it gets selected. I want to do that here.
How do you exactly click the image, set the command, and wait till you click it again before it executes the other methods?
if(TouchInput.isTriggered() && TouchInput._x > Graphics.width / 2 - 100 && TouchInput._x < Graphics.width / 2 + 100 && TouchInput._y > 440 && TouchInput._y < 480) { SoundManager.playCursor(); this._commandWindow._index = 0; }However, when say I do this:
if(TouchInput.isTriggered() && TouchInput._x > Graphics.width / 2 - 100 && TouchInput._x < Graphics.width / 2 + 100 && TouchInput._y > 440 && TouchInput._y < 480) { SoundManager.playCursor(); this._commandWindow._index = 0; DataManager.setupNewGame(); this._commandWindow.close(); this.fadeOutAll(); SceneManager.goto(Scene_Map); }we all know that when you click the image, it directly puts you on the new game and transfer you on map. Note that I hid the title command and placed them somewhere else, and an image represents them. However, in a normal command, we select the command first, click it again before it gets selected. I want to do that here.
How do you exactly click the image, set the command, and wait till you click it again before it executes the other methods?
