Make your Grass interactive and Dust / Insects environmental

8

Attached Files

The following files have been attached to this tutorial:

.rar

effects-skend.rar

Download now 997 B
.rar

behaviors-tween.rar

Download now 30.59 KB
.capx

Stats

1,968 visits, 2,765 views

Tools

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.

Published on 9 Apr, 2020.

Hello Builders ... here again bored with the quarantine, but very entertaining with what you can do in Construct2 ... I love LOGIC.

Well trying some effects or behaviors that maybe you. they do not have and they are already a little old, not updated or simply stopped working on them, I mean the "Skend" effect, this effect manages to twist a sprite to the right or to the left depending on which behavior is associated and positive values or negatives are used.

What can something like this do us? ... Imagine ... GRASS that moves when passing through it !!!

So get to work.

What do we need?

1.- The "Skend" Effect and the "EaseTween" behavior:

.RAR

effects-skend.rar

Download now 997 B
.RAR

behaviors-tween.rar

Download now 30.59 KB

2.- For the dust / insects I made we also need "Wrap" behavior:

3.- and some Grass Sprites.

The operation is simple. The grass sprite is given the effect "Skend" and the behavior "EaseTween" set to "Value", the return of "Easetween" is assigned to Value 0 of the effect "Skend" and an event is created as a trigger (collision or superimposed) to start the animation of the effect. The difficulty lies in how the grass recognizes our direction and that is solved by applying the Vector "X" of movement, recognizing if "X" is positive as "RIGHT" and negative as "LEFT", with that we can put a limit on speed Minimum to move the grass as a requirement.

Dust is a little more difficult, since it is dust or insects that are created with Bullet and they also have a Platform with everything disabled, the idea here is to be able to add inertial movement to the Bullet movement when the Character happens to carry the dust / insects.

This is also accomplished by invoking the X and Y vectors, both of the Character and of the Dust / Insect, and playing with the acceleration and deceleration of said sprites.

Subscribe to Construct videos now

Sample file:

.CAPX
  • 4 Comments

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