How to trigger events with a touchscreen while player is locked in position.

Hello fellow RPG Makers,


First of all, sorry for my bad english and possibly wrong choice of forum. I'm new here.


My question is: Does anyone know how to trigger events without the player character actually touching the event? (Action button trigger)


Example:


Uten navn.png


I want to collect the blue dots while the player stays locked in position.


I have seen plugins for mouse cursor, but I'm making a game for android, so i don't rly want a cursor. (Mabye possible to leave cursor image blank? i don't know.)


Anyway, I want something like a touchscreen, (like when you choose between apps on your mobile). 


Question 2:


If the answer is a plugin like mentioned above. What is the solution if you want to have some events triggered by approach(😎, 


and some with touch(A)?


Example:


Uten navn2.png


This is my layout at the moment. I'm using a gamepad plugin,


so the only touch option is the 5 buttons:


Uten navn3.png


Huge thanks in advance for any info on this topic!
I'd recommend Yanfly's "Picture Common Events" plugin:


http://yanfly.moe/2016/04/01/yep-88-picture-common-events/


(Note that you'll need to download and use the main Yanfly engine as well)


This will give you the ability to touch or click on a picture and have it trigger a common event. You can even do this with an image that's at 1 opacity, meaning you can have invisible buttons your screen. Note that the common events can only trigger while no other event is running, so it might not work if you have the player locked into a looping event when this is happening.


If you want to position a button over each dot, I'd make an image in an image editor that's the same size as the dots, make it completely white, then figure out how to position it so that that it'll appear over each dot. Then, set the opacity to 1 and you'll have invisible buttons over each dot that can trigger common events when tapped/clicked.


It may be a bit time consuming, but you can do a lot with MV once you can make any picture into a button. 🙂
I can't belive I didn't think of that! YEP_PictureCommonEvents and YEP_CoreEngine are literally the only two plugins I have allready installed, haha. Guess the answer was right under my nose the hole time. For some reason i must have been under the impression that additional YEP_PictureCommonEvents would conflict with my gamepad. But it's all clear to me now.


Thank you, JLowther for taking your time to answer my question! Very much appreciated!  😀
I can't belive I didn't think of that! YEP_PictureCommonEvents and YEP_CoreEngine are literally the only two plugins I have allready installed, haha. Guess the answer was right under my nose the hole time. For some reason i must have been under the impression that additional YEP_PictureCommonEvents would conflict with my gamepad. But it's all clear to me now.


Thank you, JLowther for taking your time to answer my question! Very much appreciated!  😀



Glad to help.


And I've dealt with this a great deal so keep a few other things in mind:


1. Picture "budgeting"


A picture that's higher in number will always appear above a picture that's lower in number (ie picture 2 appears above picture 1, always, and will make picture 1 unclickable if it covers it). If you're going to have lots of images overall, just remember that the ones that need to be clickable will need to be above those that don't.


2. Memory


Memory can become an issue on some older devices when it comes to having too many images loaded in the RAM. I've made a card matching game and I'm running into this problem myself on iPad2.


Best of luck!
Glad to help.


And I've dealt with this a great deal so keep a few other things in mind:


1. Picture "budgeting"


A picture that's higher in number will always appear above a picture that's lower in number (ie picture 2 appears above picture 1, always, and will make picture 1 unclickable if it covers it). If you're going to have lots of images overall, just remember that the ones that need to be clickable will need to be above those that don't.


2. Memory


Memory can become an issue on some older devices when it comes to having too many images loaded in the RAM. I've made a card matching game and I'm running into this problem myself on iPad2.


Best of luck!



Okey, will keep that in mind.


Unfortunately my project kind'a hit the wall, as each map has a limit of 100 pictures. (I was making a periodic table game).


But I'll definitely going to use this technique later on  🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-trigger-events-with-a-touchscreen-while-player-is-locked-in-position.73861/