If you're completely new to Construct, this course...
This tutorial hasn't been translated.
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.
Flying along has similarities with Flapping Bird and Endless Runner.
The player controls a pig (Player object) that is “flying” in between two edges of an infinite cave.
The further the pig goes without touching the edges (Block object) or obstacles (Car object) the more points are earned.
The user controls the Player object by touching (and keeping touching) the screen or pressing the space key down and releasing.
Touch and Keyboard plugins are used to handle these inputs.
The longer the player touches the screen (or press down Space), the higher the Player object will go and after a while (when the player is not touching the screen any longer or has released Space) it starts going down as well.
The Player object has the Custom Movement behavior to achieve this movement.
The Custom Movement behavior allows the user to program and make a custom movement adapted to their project using events.
Instead of a set of specific actions, the Custom Movement behavior will allow the user to determine the angle of motion and give various actions to the user so they can customize the movement to their need.
The Player object also has the Sine behavior that handles the angle of the object, automatically adding some “rocking” back and forth angle to the object.
The template displays a horizontal infinite scrolling, based on the usage of the Bullet behavior in a very similar way to Endless Runner
The death condition occurs when the Player object collides with either the Block or Car objects.
This resets the score and puts the game back to the start.
thanks keep up the good work!
I remade it with death, health, money, and more: construct.net/en/free-online-games/turret-defense-remake-58352/play
The INSTANCE VARIABLES EXAMPLE
I delete "System, Every tick" event, and add an action to "Text, Set text to Sprite.ClickCount" at "Mouse, On Left button Clicked on Sprite" event, but all Texts change when I click any Sprite, why?
May i set text when "Mouse, On Left button Clicked on Sprite"?
This is because of how picking/events work : construct.net/en/make-games/manuals/construct-3/project-primitives/events/how-events-work
You do not have a single instance of "Text" picked, so, the action applies to all existing "Text" instances.
To do what you want to achieve, you need to add a condition to your "Mouse, On left button clicked on Sprite" event and pick the associated "Text" instance.
This can be done using containers, or adding a instance variable to the "Text" object type, holding the UID for its associated Sprite for example.
Thanks for reply!
How does each instance of the text object know which instance of the sprite object it is linked to?
Are you referring to a specific template ? If you do, please mention which one it is.
Otherwise, Containers - construct.net/en/make-games/manuals/construct-3/project-primitives/objects/containers - can be an answer to your question.
Else, it might be picked, thanks to something like an instance variable.
I think he/she is talking about page 5: Instance variables example.
I can't download the template :/. If i click on it, it just opens the screenshot in a new tab.
All templates are found in the Start page of Construct 3 and not to be downloaded from here.