As of late 2021, we are in the process of updating Stencylpedia and fixing up outdated & broken content. Thanks for your patience!

45,874

Views

Beginner

Level

7

Comments

Effects

by Justin (Updated on 2018-11-29)


Contents

  • What are Effects?
  • Demo
  • Effects & Performance
  • Gotchas

What are Effects?

Effects let you add visual flair to actors (and images), without having to add new animations or additional code to the game. All effect-related blocks are located under Actor > Effects.

Effect Blocks in Palette

Demo

The following demo demonstrates all of the available effects in Stencyl.

Effects and Performance

Don't continually re-apply effects every frame of the game.

This will drain performance because the underlying images for the Actor's animation will continually be re-generated per-frame.

Effects in themselves are not performance impacting. It's the application of effects that takes relatively long.

Gotchas

  • Some effects may work only in Flash. These effects are denoted with a red, Flash icon.
  • On the Desktop and Mobile targets, all effects except tint are simulated using software and consequently can slow down games, especially when you use "remove all effects".
  • Effects persist, even when an Actor's animation changes.
  • Only 1 effect may be applied at a time to a particular actor or image. To apply several, use the apply block multiple times.

Tip: On Desktop and Mobile, if you want to tint an actor and un-tint it, instead of using "remove all effects", apply a white tint to the actor, which has the same net effect, without the performance penalty.

Summary

  • Use effects to add visual flair without importing new animations.
  • Use effects responsibly to maintain good performance.
Print Article Edit Article How to Edit an Article
Disclaimer: Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!

7 Comments

Slavescu Emanuel
Is there any way to remove an effect once a target attribute has been reached?

For example I want to change the hue by 10 points with every click until it reaches 80 and then stop.

I guess I could remove the event listener for the click, but I don't know how to do that either.

Any ideas?

0 8 years, 10 months ago
raeddarweesh
Where to find the source of this Demo? (sorry for mistyping in last comment)
0 9 years, 1 month ago
raeddarweesh
Were to find the source this demo ?
0 9 years, 1 month ago
Diweinstein
Carlhaacke - That would be more of a job for images. What I would do, should I need that mechanic in my game, is I would put a black image on the entirety of the scene, and make it so the actor continually takes out a circle of the image around him. Here's what I'm talking about, at least a bit.
http://static.stencyl.com/pedia2/ch 6/image/tank.gif
You see how the ground gets carved out when a bullet hits it? That's all an image, and you can do that continually with your actor, if there is an image on the screen.

0 9 years, 5 months ago
carlhaacke
I want to create a game where only a section of the scene is visible around the actor. As the actor moves forward more of the scene becomes visible. So, its as if an explorer is walking through an unknown area that is dark. As they travel, it becomes illuminated and known.

How could I do that?

1 10 years, 5 months ago
Feniso
Also, in 3.0 applying another tint doesn't reset the previous one anymore.
0 10 years, 5 months ago
Feniso
In Stencyl 3.0 the tint effect doesn't work properly. Even using light color, the color resulting is always a dark gray-black. I've tried using low percentage, but every color results in a darker and grayish version when applied to an actor. In the previous version it worked perfectly, does anyone knows how to fix this? (I'm italian, sorry for my bad english)
0 10 years, 5 months ago

Sign In to Comment