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

Arteefy

Villager
Member
Joined
Jan 20, 2017
Messages
9
Reaction score
2
First Language
norwegian
Primarily Uses
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(B)


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!
 
Last edited by a moderator:

JLowther

Veteran
Veteran
Joined
Feb 20, 2016
Messages
327
Reaction score
38
First Language
English
Primarily Uses
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. :)
 
Last edited by a moderator:

Arteefy

Villager
Member
Joined
Jan 20, 2017
Messages
9
Reaction score
2
First Language
norwegian
Primarily Uses
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!  :D
 
Last edited by a moderator:

JLowther

Veteran
Veteran
Joined
Feb 20, 2016
Messages
327
Reaction score
38
First Language
English
Primarily Uses
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!  :D


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!
 

Arteefy

Villager
Member
Joined
Jan 20, 2017
Messages
9
Reaction score
2
First Language
norwegian
Primarily Uses
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  :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top