I need help to make "player was hit" feedback

0 favourites
  • 4 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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:

    <img src="http://i.imgur.com/ZO4voHP.jpg" border="0" />

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

    Much appreciated =)

  • 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)

  • 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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)