Randomised Butterflies

1

Index

Attached Files

The following files have been attached to this tutorial:

.capx

butterflies.capx

Download now 175 KB

Stats

2,720 visits, 4,676 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Colouring the Butterflies

Right click the Butterfly in the Objects Window again, and add the Tint Effect. Then go back to the Event Sheet and add some more actions to happen when the Butterfly spawns (I did this in a blank sub event to keep it neater).

I fancied some pink and purple butterflies, so here are my values and their result:

Multicoloured Butterflies

Now you can take this a step further, and make a bigger variety without the weird brown colours in the middle. Give the Butterfly an instance variable, call it Colour (or Color if you're going to be like that).

When the Butterfly is created add another action, set the value of Colour to random(0.10).

Now make a sub-event of that event, and make the condition If Colour less than or equal 5, and another If Colour greater than 5 and give each sub-event different RGB values. Here is what I entered, and my results.

Woot now you have some lovely random butterflies to add to your background! And the method works for other things, such as snowflakes or leaves:

.CAPX

butterflies.capx

Download now 175 KB
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!