How do I get a touch effect of sprite button with webgl ?

Get help using Construct 2

Post » Fri Jul 18, 2014 7:59 am

I have lots of of image/sprite button but doesn't have 2 state of image to show the touch effect. Is there anyway i can use webgl shader effects to simulate a touch/click like by reducing the opacity or shrinking or by some other means. I am specifically designing for iOS and Android touch devices.
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Fri Jul 18, 2014 8:15 am

Why would You use CPU intensive webgl for something that can be created in an image editor?
Especially on mobile platforms it would be wise to try and use as little processing power as you can to optimize your game.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jul 18, 2014 8:27 am

You could also just do something like:

- On Touched Sprite = Set Opacity to 50
- On any touch end = Set Opacity to 100

Although, just adding an extra frame and changing the frame would probably be easier if you have many objects.
You do not have the required permissions to view the files attached to this post.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Sun Jul 20, 2014 4:18 pm

thanks for the capx, if it's one object it's fine , but i have several buttons (levels dynamically generated) , help button (the object may not be of same type) , how do i know which object i clicked on the Touch End Event to set the opacity back to 100 ? even if i store the UID , i am not seeing if i can pick up the generic objec to set the opacity,

any help or any other way this can be achieved ?
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Mon Jul 21, 2014 5:46 pm

Bump.
B
16
S
4
Posts: 248
Reputation: 2,267


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948, Ninjadoodle, plinkie, sublimate, Yahoo [Bot] and 10 guests