Monday, 20 January 2014

Behaviours

Behaviours

Behaviours are on all the objects you choose but some objects have different behaviours to others.
We will start with how to view an objects behaviours, once you have placed the object you want onto the layout you do these steps to view the objects Behaviours.

Step 1- Go to the left side panel and go down to the "Behaviours" sub section.

Step 2- Click the "+" to maximise it if not already done.
Step 3- Click "Behaviours" which is next to "Add / edit".

Step 4- Now a new window has popped up you will need to click the "+" icon on the top bar of the window.

Step 5- You now have a list of Behaviours available choose the ones you want for the object you have selected.


Tip* If you click on a Behaviour it will give a brief summary of what the behaviour does at the bottom.

Some Behavious have settings you can edit in the left side panel under the "Behaviours" sub section.
Adding behaviours also add new events and actions that can be used on objects within the "Event Sheet".

Event Sheets

Event Sheets

Event sheets are the "controls" for the game, its where you make everything work as you want, you can change the gameplay controlls, make buttons do what theyre supposed to do and much more.

Adding Events are simple and basic but they go into much more detail when you add actions onto events, you can add a simple event with a simple action or you can add a more complex event in which it will lead off into multiple actions, an example of this would be.

Simple- You can add an event in which when a button object is clicked it will load a new layout.


Moderate- If you wanted to add in an acid pit that kills the player you would need to create an event that would be when the "Player Collides with Acid", and then the action would be "Go to Layout" then the layout of your choice.


Hard- You may want the screen to shake as you die when your player goes into the acid so youll need to start with the event "Player Collides with Acid" and then add an action in which it waits before you go to the other layout which would be "Wait (x amount of seconds)" and then you will want the screen to shake so youll then add the action "Shake (altitude number) (seconds of screen shake)" and then you would want the "Go to Layout"

Adding an event ranges in difficulty because it is spread out like a tree you start with selecting one of your many objects and then depending on what object you select there are events for it, and when you choose one of the events it will bring another window specifing what you want that event to do.




Example-
If you wish for something to happen when your player collides with a object you do these steps.

Step 1- Click "Add Event"


Step 2- You choose your player sprite

Step 3- You go through all of the events and find "On collision with another object"

Step 4- You click "<click to choose>" and then select the object you want to create an event for when the player collides with it.




If you want a player to die when colliding with it you would then need to click "Add action" then follow these steps.

Step 1- Click on "System"
Step 2- Choose "Go to layout"
Step 3- Within the Layout drop box you select on the layout you wish the game to go to so i would choose for it to go to "Dead Layout"

Now when my player collides with the object i have choosen it will load the dead screen showing that i have died.









When Creating an Event you start with clicking "Add event"




You then choose the Object you want an event to happen for.

Now another menu will pop up with the events you can apply to that object.



Once you have selected an event you then need to add an "Action".


When clicking this it is similar to adding an "Event" a new menu appears with the objects you want to add an action too.


Once youve chosen the object to add an "Action" too it will bring up a new window with a list of "Actions" which will look similar to the "Events"



Once you have added an "Action" it should look similar to this.


The difference between an "Action" and an "Event" is that the events lead the actions. Your events make the actions happen you cannot have any actions without an event happening first, the event is a trigger which allows the actions to play out.

You can build up multiple actions onto a single event like so.


Z Order

Z Order's

When adding objects you can re-arrange the order they are seen in. An example would be, if we placed a "Sprite" object onto the layout which would be the player and then place another "Sprite" which would be the tree, you can arrange the order there in so the player would walk infront or behind the tree. You do this by following these simple steps.

Step 1- Right click the object you want to change the order of.
Step 2- Left click on "Z Order".
Step 3- Choose top if you would like it infront of everything or bottom if you want it behind everything.



Adding Objects

Adding Objects

Adding an object is simple, but there are various types of objects you can add, wether its a sprite or partical and any other range of objects it starts the same way.

Step 1- Click the layout you want to add the object too.
Step 2- Right click on the layout and click "Insert new object"

Now you should have a small window open that looks like this.
This window contains multiple objects you can put into your game.
By clicking once on any of the objects it will give a brief Description of what that object does.

Creating A New Project

Okay to start you off on your journey using Construct 2 firstly you will have to open Construct 2 and this page will appear.

Now that you have opened construct 2 proceed by following these simple instructions.
Step 1- Click File, New.
Step 2- Click "New project with common objects".

You will now have a page that will look like this.
You can click the "x" on the "Start Page" tab as it is no longer needed.
As you can see you are starting with a simple blank Layout page and an Event sheet, you can click the "x" on either at any time and open it back up on the side panel under "New Project" and "Layouts" or "Event Sheets".

Tip* You can name your layouts or event sheets by right clicking on the layout or eventsheet on the side pannel and clicking "re-name" this is usefull if you have multiple event sheets and layouts so they can be kept in order.

View Point


Okay now you have a new layout and event sheet you can start by looking at the interface.
There is a Thin dotted box on your layout sheet. This is the camera view and can be changed by clicking on the "New Project" folder in the right side panel and then going to the left side panel and changed the "Window Size".

Tip* Clicking the "+" next to the "Window Size" or on any other option similar to this will extend it allowing you to see the Width and Height making it easier for you.

Layout Size

Your layout "the page" size can be changed, so if you have a long game you can change width of the layout to fit your game on, or if the length of your game is long you can change the length of the page by following these simple steps.

Step 1- Click the layout you want to change.
Step 2- Within the left side panel change the "Layout Size"

Once this is done you should notice a diference in either length or width or both.