How do I link a brightness effect to a sprite's size?

Get help using Construct 2

Post » Thu Jul 23, 2015 5:00 am

Hello. Long time (ish) Construct-er, first time caller. How are ya'll doing?

I'm trying to link a brightness effect, more specifically it's value, to the size of a sprite.

I spawn in traffic at the start of the layout like so:

And here it is in-game:

I apologise for the bad quality. As you can see I try to size them up or down to show that some are closer or farther away. I'm trying to apply a brightness effect and make the cars darker the smaller they are (or further away they're meant to look).

Here's an example of what I've tried:

And the results:

As you can see it doesn't work, no matter what size they are they (the cars) are fully blacked out. The cars are meant to get darker and darker the smaller they are. I'm not sure how to get the effect I'm after, or how to do it.

I'm familiar with linking opacity and scale to bullet speed, which I've done with some stars: But that's pretty much as far as my knowledge goes with linking variables (if that's even the correct terminology).

Any help or feedback would be muchly appreciated. If you even come up with a better way to do what I'm trying to do please don't hesitate to say so, I'm open to any and all suggestions.

Thank you for your time and have a good day!
Posts: 2
Reputation: 354

Post » Thu Jul 23, 2015 5:55 am

-create object HoverCar
-set instance variable to random(0.03,0.07)
-set scale to instance variable
-set seffect parameter to instance variable*1500

Posts: 1,482
Reputation: 10,825

Post » Thu Jul 23, 2015 6:34 am

Thank you very much! Exactly what I was after and it works great.
Posts: 2
Reputation: 354

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 9 guests