Adding Behaviors part 5

Adding Behaviors part 5
Adding Behaviors

Welcome guys ! So in the last tutorial i show methods of adding sprites in our game. And now i am going to adding some behaviors to our sprites. Before we add some behaviors, let me explain what the heck is behavior? It is very simple, a behavior is a reaction of sprites in the game. So construct 2 or C2 is providing many built in behaviors. They are used in different situation. It depends on your game. But i am going to show you method of adding behavior to our "Player" and "Monsters/Enemies".

First of all you have to select "Player" and then you will see some properties of your player on left side (Properties panel). And here is an image for help.
Adding Behaviors part 5
Properties
Now you will see a pop-up window with nothing to see. i.e
Adding Behaviors part 5
Adding Behaviors part 5

Click on "plus icon" as shown in image below.
Adding Behaviors part 5
Adding Behaviors part 5

Now you will see another pop-up window with many behaviors. Click on search bar at the top left corner of Behavior window and type for "8 Direction". Now select "8 Direction" behavior and click on "Add" button.
Adding Behaviors part 5
Adding Behaviors part 5

Adding Behaviors part 5
Adding Behaviors part 5

Now click again on "Plus" icon as shown in above image and now type  "Bound to layout" in search bar. Click on "Bound to layout" and then click on "Add" button. Again click on "Plus" icon, now type "" in search bar "Scroll to". Same again click on "Scroll to" and then click on "Add" button. And now close all pop-up windows.
Adding Behaviors part 5
Adding Behaviors part 5

Click on "Play" button, which is present (See above image) in top left corner of construct 2 or C2. And press "Arrow Keys" on Keyboard, you will see your player is moving. So congratulation your player is now reacting on pressing keyboard arrow keys. And if you guys have any question please leave your comment. And don't forget to subscribe.

Click here to see video.

See video:


Share this

Related Posts

Previous
Next Post »