I need help to make "player was hit" feedback

Get help using Construct 2

Post » Sat Nov 23, 2013 9:44 am

I kinda want to make the player sprite glow to orange back and forth two times + maybe some opacity change.

I have the opacity broken down with this:



But I still need a way to change, say, the hue of the sprite.

Much appreciated =)
B
33
S
9
G
1
Posts: 156
Reputation: 3,024

Post » Sat Nov 23, 2013 10:18 am

I havent found an option to change the hue of a sprite yet in construct 2 .. maybie because i never needed it.

but you can simpli create these effects with hue and opacity at once if you just create an animation. Edit your sprite with Photoshop and create a Frame for every step you want. then add all the animation frames to you sprite and set up something like:

EnemyB(ullet?) - On collision with player: start animation by name "gotHit"

of course you have to set the animation speed in your sprite editor to 0, because the animation is running by default.

I guess this would also be more resource efficient since at least mobile devices need a lot of memory for things with opacity calculations. (correct me if I'm wrong)
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Sat Nov 23, 2013 9:49 pm

I'm generally trying to avoid using more sprites - hence editing them and losing more times - and I'm not aiming for mobile devices right now... we'll see what I can do.

I'm just trying to learn what Construct 2 can do! =)

Thanks for the heads up!notnsane2013-11-23 21:50:42
B
33
S
9
G
1
Posts: 156
Reputation: 3,024

Post » Sun Nov 24, 2013 2:42 am

Well if you wanna use WebGL, there is always the Adjust HSL effect to change the hue.
If you wanna change the value over time with the sine behavior, use the value only setting and set the HSL parameter to sprite.sine.value when the behavior is active.

Although I'd suggest to just manually change it over time with easing functions or use the litetween plugin, since the sine behavior does not allow setting the position of the cycle. So if you stop it in the mid, it will start in the mid again, which kinda sucks as it can lead to unwanted results like jumping in opacity or position.mindfaQ2013-11-24 02:43:45
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Casimir, R0J0hound, Syazanie Amirin, tarek2 and 9 guests