Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop:tutorials:beginnertutorial2 [2019/05/28 19:25]
tany13 [Deleting the bullets going out of the screen]
gdevelop:tutorials:beginnertutorial2 [2020/12/26 13:56] (current)
Line 8: Line 8:
 {{ gdevelop:tutorials:imagebeginnertutorial_54_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_54_.png?nolink |}}
  
-<note>Note that you can read the **[[gdevelop:documentation:manual:edit_getstart|Getting Started page]]** so as to get an overview of the software: It explains the main concepts and describe the interface of GDevelop.</note>+<note>Note that you can read the **[[gdevelop:documentation:manual:edit_getstart|Getting Started page]]** so as to get an overview of the software: It explains the main concepts and describes the interface of GDevelop.</note>
  
 ===== Download GDevelop ===== ===== Download GDevelop =====
  
-If you do not have GDevelop, download it from the official website : **[[http://compilgames.net]]**. \\+If you do not have GDevelop, download it from the official website: **[[http://compilgames.net]]**. \\
 Always download GD from this page to be sure to have the **latest version**.\\ Always download GD from this page to be sure to have the **latest version**.\\
 Install or extract GDevelop and launch it. The start page is displayed: Install or extract GDevelop and launch it. The start page is displayed:
Line 30: Line 30:
  
 Choose also a directory and a filename for your game, and press Ok to create the project.\\ Choose also a directory and a filename for your game, and press Ok to create the project.\\
-A first scene is automatically create and opened for you the first time you create a game:+A first scene is automatically created and opened for you the first time you create a game:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_4_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_4_.png?nolink |}}
Line 44: Line 44:
  
 The player will be controlling a turret to shot on the enemies.\\ The player will be controlling a turret to shot on the enemies.\\
-Make a right click on the center of gray scene in GDevelop and choose ''Add a new object''. A window popups so as to choose the type of the object to create:+Make a right-click on the center of the gray scene in GDevelop and choose ''Add a new object''. A window popups so as to choose the type of the object to create:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_5_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_5_.png?nolink |}}
Line 52: Line 52:
 {{ gdevelop:tutorials:imagebeginnertutorial_6_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_6_.png?nolink |}}
  
-The first thing to do is too add the turret image: Make a right click on the white area at the bottom of the window, and choose ''Add an image from a file'':+The first thing to do is to add the turret image: Make a right-click on the white area at the bottom of the window, and choose ''Add an image from a file'':
  
 {{ gdevelop:tutorials:imagebeginnertutorial_7_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_7_.png?nolink |}}
Line 60: Line 60:
 {{ gdevelop:tutorials:imagebeginnertutorial_8_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_8_.png?nolink |}}
  
-You can then close the Sprite editor so as to go back to the scene editor. The object is displayed at the point where you made the right click:+You can then close the Sprite editor so as to go back to the scene editor. The object is displayed at the point where you made the right-click:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_9_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_9_.png?nolink |}}
Line 66: Line 66:
 You can move the object by keeping the left button of the mouse pressed on it. You can move the object by keeping the left button of the mouse pressed on it.
  
-By default, an object is called ''NewObject'' by GDevelop. To change this, select the object in the list in the right hand side of the window, and press ''F2''. Enter then ''Turret'' as a new name and press ''Enter''.+By default, an object is called ''NewObject'' by GDevelop. To change this, select the object in the list in the right-hand side of the window, and press ''F2''. Enter then ''Turret'' as a new name and press ''Enter''.
  
 ===== First events ===== ===== First events =====
Line 79: Line 79:
 {{ gdevelop:tutorials:imagebeginnertutorial_11_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_11_.png?nolink |}}
  
-The event is created, with an empty list of condition ( on the left part ) and an empty list of actions ( on the right ). Put your cursor over the action list and choose ''Add an action'' in the context panel that appeared:+The event is created, with an empty list of conditions ( on the left part ) and an empty list of actions ( on the right ). Put your cursor over the action list and choose ''Add an action'' in the context panel that appeared:
 {{ gdevelop:tutorials:imagebeginnertutorial_12_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_12_.png?nolink |}}
  
 The first action will turn the turret toward the mouse: In the window, choose the action ''All objects > Angle > Rotate toward position''.\\ The first action will turn the turret toward the mouse: In the window, choose the action ''All objects > Angle > Rotate toward position''.\\
-When selected, the right part of the window show the name of the action as well as the parameters. Fill the first parameter by entering ''Turret'' ( You can also click on the button next to the parameter to get a list of the available objects ).+When selected, the right part of the window shows the name of the action as well as the parameters. Fill the first parameter by entering ''Turret'' ( You can also click on the button next to the parameter to get a list of the available objects ).
 For the next parameters, enter ''MouseX()'' and ''MouseY()'' so that the object turns toward the mouse position. When the game will be launched, these two expressions will be replaced by the position of the mouse. For the next parameters, enter ''MouseX()'' and ''MouseY()'' so that the object turns toward the mouse position. When the game will be launched, these two expressions will be replaced by the position of the mouse.
  
Line 92: Line 92:
  
 Click on ''Ok''. The action is added to the event.\\ Click on ''Ok''. The action is added to the event.\\
-As there is not any condition, the action will be repeated each time the screen is refreshed ( About 60 times per seconds ). The turret will thus be always oriented toward the mouse.+As there is not any condition, the action will be repeated each time the screen is refreshed ( About 60 times per second). The turret will thus be always oriented toward the mouse.
  
 You can launch a preview of the game: Just go back to the scene editor ( Click on the ''Scene'' tab next to the ''Events'' tab ) and then, in the ribbon, click on ''Preview''.\\ You can launch a preview of the game: Just go back to the scene editor ( Click on the ''Scene'' tab next to the ''Events'' tab ) and then, in the ribbon, click on ''Preview''.\\
Line 104: Line 104:
  
 The player must be able to shoot some bullets on the enemies.\\ The player must be able to shoot some bullets on the enemies.\\
-First, we need a ''Bullet'' object: In the objects list on the right, make a right click on an object and choose ''Add an object''. Choose a ''Sprite'' object as before and name the object ''Bullet'' ( Right click on the object > ''Rename'' ).\\+First, we need a ''Bullet'' object: In the objects list on the right, make a right-click on an object and choose ''Add an object''. Choose a ''Sprite'' object as before and name the object ''Bullet'' ( Right-click on the object > ''Rename'' ).\\
  
 {{ gdevelop:tutorials:imagebeginnertutorial_16_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_16_.png?nolink |}}
  
-Then, make a double click on the object to edit it. Add an image to the object: Right click on the white area on the bottom, choose ''Add an image from a file'' and choose the bullet image in the project folder.+Then, make a double click on the object to edit it. Add an image to the object: Right-click on the white area on the bottom, choose ''Add an image from a file'' and choose the bullet image in the project folder.
  
 Close the window. You will notice that the object does not appear on the scene as we added it thanks to the list.\\ Close the window. You will notice that the object does not appear on the scene as we added it thanks to the list.\\
Line 122: Line 122:
 Click on ''Ok'' to finalize the action.\\ Click on ''Ok'' to finalize the action.\\
 Then add another action after this first action ( Do not create another event! ). This time, choose the action called ''All objects > Displacement > Add a force ( Angle )''.\\ Then add another action after this first action ( Do not create another event! ). This time, choose the action called ''All objects > Displacement > Add a force ( Angle )''.\\
-GDevelop provide a built-in forces system allowing to easily move the objects. This action will be used to move the bullet toward the mouse when fired. As the first parameter, enter ''Bullet'' so that GDevelop will move the bullet just created in the last action. Enter then ''Turret.Direction()'' in the 2nd parameter to use the turret direction. For the 3rd parameter, enter ''400'' so that the bullet will move with a speed of 400 pixels per seconds. Finally, enter ''1'' in the last parameter so that the bullet will keep moving after the moment it was created.+GDevelop provides a built-in forces system allowing to easily move the objects. This action will be used to move the bullet toward the mouse when fired. As the first parameter, enter ''Bullet'' so that GDevelop will move the bullet just created in the last action. Enter then ''Turret.Direction()'' in the 2nd parameter to use the turret direction. For the 3rd parameter, enter ''400'' so that the bullet will move with a speed of 400 pixels per second. Finally, enter ''1'' in the last parameter so that the bullet will keep moving after the moment it was created.
  
  
Line 132: Line 132:
 {{ gdevelop:tutorials:imagebeginnertutorial_20_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_20_.png?nolink |}}
  
-Choose the condition ''Mouse > A button is pressed''. Write ''Left'' in the parameter ( or click on the button on the right of the parameter to display an helper ) and close the window by clicking on ''Ok''.\\+Choose the condition ''Mouse > A button is pressed''. Write ''Left'' in the parameter ( or click on the button on the right of the parameter to display helper ) and close the window by clicking on ''Ok''.\\
 The condition is now added to the event. The condition is now added to the event.
  
-If you preview the game now, you'll see that we have two problems: The bullet are fired too fast, and the appear at the object's origin, which is not very realistic.+If you preview the game now, you'll see that we have two problems: The bullet is fired too fast, and they appear at the object's origin, which is not very realistic.
  
 To address the first issue, we're going to use a timer: Add a condition to the last event we've created. Choose the condition ''Timers > Timer's value'' and enter ''0.25'' in the first parameter, and ''"FireRate"'' in the second parameter, which is the name of the timer we're going to use (// Do not forget the **quotes** around the timer's name! )//. To address the first issue, we're going to use a timer: Add a condition to the last event we've created. Choose the condition ''Timers > Timer's value'' and enter ''0.25'' in the first parameter, and ''"FireRate"'' in the second parameter, which is the name of the timer we're going to use (// Do not forget the **quotes** around the timer's name! )//.
Line 141: Line 141:
 {{ gdevelop:tutorials:imagebeginnertutorial_21_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_21_.png?nolink |}}
  
-Then, add an action ''Timer > Reset a timer'' in the same event, with ''"FireRate"'' as parameter ( again, beware of the quotes! ). This pair of condition and action will ensure that the actions used to fire the bullet are repeated when at least 0.25 seconds is elapsed since the last bullet creation :+Then, add an action ''Timer > Reset a timer'' in the same event, with ''"FireRate"'' as parameter ( again, beware of the quotes! ). This pair of condition and action will ensure that the actions used to fire the bullet are repeated when at least 0.25 seconds is elapsed since the last bullet creation :
  
 {{ gdevelop:tutorials:imagebeginnertutorial_22_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_22_.png?nolink |}}
Line 154: Line 154:
  
 You can now close the window. We must now tell to GDevelop to create the bullets at the position of the point:\\ You can now close the window. We must now tell to GDevelop to create the bullets at the position of the point:\\
-In the events editor, put the cursor on the ''Turret.X()'' parameter and make a click: A text field will be shown. Use it to replace the parameter by ''Turret.PointX(Canon)'' and click anywhere to close the text field. Modify also the ''Turret.Y()'' parameter to replace it by ''Turret.PointY(Canon)'' :+In the events editor, put the cursor on the ''Turret.X()'' parameter and make a click: A text field will be shown. Use it to replace the parameter by ''Turret.points(Canon)'' and click anywhere to close the text field. Modify also the ''Turret.Y()'' parameter to replace it by ''Turret.PointY(Canon)'' :
  
 {{ gdevelop:tutorials:imagebeginnertutorial_25_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_25_.png?nolink |}}
Line 164: Line 164:
 ===== Creating enemies attacking the turret ===== ===== Creating enemies attacking the turret =====
  
-First, we must create the objects used for the enemies: Add an object to the object list ( Right click on an existing object > ''Add an object''. Choose a ''Sprite'' object as before. ). Name it ''Enemy''.+First, we must create the objects used for the enemies: Add an object to the object list ( Right-click on an existing object > ''Add an object''. Choose a ''Sprite'' object as before. ). Name it ''Enemy''.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_27_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_27_.png?nolink |}}
  
-Edit the object ( Double click on it in the list ) and add to it two images: ''tank2fr1.png'' and ''tank2fr2.png''. Then, make a right click on ''Animation 0'' in the list of animations on the left part of the window, and change the time between the images: Set it to 0.05 s for example. Check also ''Loop the animation'' to ensure that the animation is repeated:+Edit the object ( Double click on it in the list ) and add to it two images: ''tank2fr1.png'' and ''tank2fr2.png''. Then, make a right-click on ''Animation 0'' in the list of animations on the left part of the window, and change the time between the images: Set it to 0.05 s for example. Check also ''Loop the animation'' to ensure that the animation is repeated:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_28_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_28_.png?nolink |}}
Line 187: Line 187:
 {{ gdevelop:tutorials:imagebeginnertutorial_30_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_30_.png?nolink |}}
  
-We can then add another action to create an ''Enemy'' object: Add an action ''All objects > Objects > Create an object''. Enter ''Enemy'' in the first parameter. For the second parameter, the X position of the new object to be created, enter ''Random(800)'': This will return a random number between 0 and 800so that the created enemy will have a different position when they are created. For the Y position, enter ''-50''. This will create the enemy outside the screenso that the player won't have the feeling that an enemy tank just appeared from nowhere.+We can then add another action to create an ''Enemy'' object: Add an action ''All objects > Objects > Create an object''. Enter ''Enemy'' in the first parameter. For the second parameter, the X position of the new object to be created, enter ''Random(800)'': This will return a random number between 0 and 800 so that the created enemy will have a different position when they are created. For the Y position, enter ''-50''. This will create the enemy outside the screen so that the player won't have the feeling that an enemy tank just appeared from nowhere.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_31_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_31_.png?nolink |}}
  
-For now, the enemies are created but are not moving. Add another event without any condition. Add then an action: We want the enemy to move toward the player. Choose the action ''All objects > Displacement > Move an object toward another''. For the first parameter, enter ''Enemy'', and ''Turret'' for the second parameter. Enter a length of 150 for the force, and damping of 0, as the force will be continuously applied.+For now, the enemies are created but are not moving. Add another event without any condition. Add then an action: We want the enemy to move toward the player. Choose the action ''All objects > Displacement > Move an object toward another''. For the first parameter, enter ''Enemy'', and ''Turret'' for the second parameter. Enter a length of 150 for the force, and damping of 0, as the force will be continuously applied.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_32_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_32_.png?nolink |}}
  
-Thanks to the last event, enemy will be moving. One last thing is to make sure that enemies are oriented toward the turret: Add a second action called ''All objects > Angle > Rotate toward position''. Enter ''Enemy'' as first parameter. Then, we want the ''Enemy'' to turn toward the position of the ''Turret'', so set ''Turret.X()'' and ''Turret.Y()'' respectively in the next two parameters. These two expressions returns the X and Y position of the ''Turret''. We can improve this action by setting ''Turret.X(Centre)'' and ''Turret.Y(Centre)'' instead so as to turn the ''Enemy'' towards the centre position of the ''Turret''.+Thanks to the last event, the enemy will be moving. One last thing is to make sure that enemies are oriented toward the turret: Add a second action called ''All objects > Angle > Rotate toward position''. Enter ''Enemy'' as the first parameter. Then, we want the ''Enemy'' to turn toward the position of the ''Turret'', so set ''Turret.X()'' and ''Turret.Y()'' respectively in the next two parameters. These two expressions return the X and Y position of the ''Turret''. We can improve this action by setting ''Turret.X(Centre)'' and ''Turret.Y(Centre)'' instead so as to turn the ''Enemy'' towards the centre position of the ''Turret''.
  
 {{ gdevelop:tutorials:beginnertutorial-rotate.png?nolink |}} {{ gdevelop:tutorials:beginnertutorial-rotate.png?nolink |}}
Line 203: Line 203:
 {{ gdevelop:tutorials:beginnertutorial-enemyevents.png?nolink |}} {{ gdevelop:tutorials:beginnertutorial-enemyevents.png?nolink |}}
  
-If you launch a preview, you will see that enemies are created and are moving. If it doesn't work, double check your events: Check that the timer's name is correct and is the same in the condition and in the action. Also check that the last parameter of the action used to move the enemies is 0.+If you launch a preview, you will see that enemies are created and are moving. If it doesn't work, double-check your events: Check that the timer's name is correct and is the same in the condition and in the action. Alsocheck that the last parameter of the action used to move the enemies is 0.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_34_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_34_.png?nolink |}}
Line 217: Line 217:
 {{ gdevelop:tutorials:imagebeginnertutorial_36_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_36_.png?nolink |}}
  
-When the images are added, change the time between the images ( Right click on ''Animation 0'' to display the options of the animation ).+When the images are added, change the time between the images ( Right-click on ''Animation 0'' to display the options of the animation ).
  
 {{ gdevelop:tutorials:imagebeginnertutorial_37_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_37_.png?nolink |}}
Line 231: Line 231:
  
 When the condition is done, add an action to create an object ''Explosion''. For the position, enter ''Enemy.X()'' and ''Enemy.Y()'' to create the explosion at the tank position.\\ When the condition is done, add an action to create an object ''Explosion''. For the position, enter ''Enemy.X()'' and ''Enemy.Y()'' to create the explosion at the tank position.\\
-Add another action called ''All objects > Objects > Delete an object''. As parameter, enter ''Enemy'' so that the tank will be destroyed.+Add another action called ''All objects > Objects > Delete an object''. As parameter, enter ''Enemy'' so that the tank will be destroyed.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_39_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_39_.png?nolink |}}
Line 239: Line 239:
 {{ gdevelop:tutorials:imagebeginnertutorial_40_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_40_.png?nolink |}}
  
-You may have noticed that explosions objects are not destroyed when their animation is over! This can be a problem as they stay on the scene, making the game less efficient. We must always clean our garbage: Add a new event. Add a condition ''Sprite > Animation > Animation is over''. Enter ''Explosion'' as parameter: The condition will be true when an explosion's animation will be over. Add an action to the event to then destroy the ''Explosion'' object:+You may have noticed that explosions objects are not destroyed when their animation is over! This can be a problem as they stay on the scene, making the game less efficient. We must always clean our garbage: Add a new event. Add a condition ''Sprite > Animation > Animation is over''. Enter ''Explosion'' as parameter: The condition will be true when an explosion's animation will be over. Add an action to the event to then destroy the ''Explosion'' object:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_41_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_41_.png?nolink |}}
Line 255: Line 255:
 {{ gdevelop:tutorials:imagebeginnertutorial_42_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_42_.png?nolink |}}
  
-Edit it ( Double click on it in the objects list ) and modify the text. Also click on ''Choose the font'' and select the font that was in the resource archive that you extracted in the project folder. Finally, you can increase a bit the size of the text:+Edit it ( Double click on it in the objects list ) and modify the text. Alsoclick on ''Choose the font'' and select the font that was in the resource archive that you extracted in the project folder. Finally, you can increase a bit the size of the text:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_43_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_43_.png?nolink |}}
  
-When you're done, click on Ok to close the editor of the object. Go to the scene editor and put the text on the scene: Just drag it from the objects list to the scene ( Put the cursor hover the object in the list, make a left click and keep pressing the left button of the mouse, then move the cursor to the scene and release the button to put the object ).+When you're done, click on Ok to close the editor of the object. Go to the scene editor and put the text on the scene: Just drag it from the objects list to the scene ( Put the cursor over the object in the list, make a left click and keep pressing the left button of the mouse, then move the cursor to the scene and release the button to put the object ).
  
 For now, the object is always displayed. Go to the events editor and add a new event. Add a condition ''Scene > At the beginning of the scene'' and an action ''All objects > Visibility > Hide an object'', with ''GameOver'' as parameter. Thus, the text will be hidden when the game will be launched. For now, the object is always displayed. Go to the events editor and add a new event. Add a condition ''Scene > At the beginning of the scene'' and an action ''All objects > Visibility > Hide an object'', with ''GameOver'' as parameter. Thus, the text will be hidden when the game will be launched.
  
-To display the text when the turret is destroyed, add another event. Add a condition ''All objects > Objects > Number of objects''. Enter ''Turret'' as the first parameter, then ''='' in the second parameter and ''0'' for the third: The condition will be fulfilled when the number of turret of the scene will reach 0, that is to say when the player will be destroyed.+To display the text when the turret is destroyed, add another event. Add a condition ''All objects > Objects > Number of objects''. Enter ''Turret'' as the first parameter, then ''='' in the second parameter and ''0'' for the third: The condition will be fulfilled when the number of the turret of the scene will reach 0, that is to say when the player will be destroyed.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_45_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_45_.png?nolink |}}
Line 275: Line 275:
 {{ gdevelop:tutorials:imagebeginnertutorial_47_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_47_.png?nolink |}}
  
-Finally, an interesting effect is to stop the game when the Game Over is displayed. Add one more action to the last event: Choose the ''Timers and time > Time scale'' action and enter 0 as parameter to pause the game.+Finally, an interesting effect is to stop the game when Game Over is displayed. Add one more action to the last event: Choose the ''Timers and time > Time scale'' action and enter 0 as parameter to pause the game.
  
 {{ gdevelop:tutorials:imagebeginnertutorial_48_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_48_.png?nolink |}}
Line 289: Line 289:
 ===== Deleting the bullets going out of the screen ===== ===== Deleting the bullets going out of the screen =====
  
-It is a must to destroy our garbage so as to prevent the game being flooded with tons of useless objects, which slow it down. That's why we take care of deleting the explosions when the animations is over. But what about the bullets? When they go outside of the screen, they still exist and the computer must update them each time the screen is refreshed: This can lead to a performance bottleneck.+It is a must to destroy our garbage so as to prevent the game from being flooded with tons of useless objects, which slow it down. That's why we take care of deleting the explosions when the animations are over. But what about the bullets? When they go outside of the screen, they still exist and the computer must update them each time the screen is refreshed: This can lead to a performance bottleneck.
  
-We could add an event to destroy the bullets when they are too far from the turret- that is quite easy. But we can also use a //behavior//: A //behavior// is used to add specific behavior to an object. Here, we are going to use a behavior that will automatically destroy the object when it goes outside the screen.+We could add an event to destroy the bullets when they are too far from the turret- that is quite easy. But we can also use a //behavior//: A //behavior// is used to add specific behavior to an object. Here, we are going to use a behavior that will automatically destroy the object when it goes outside the screen.
  
-Right click on the object in the object list and choose ''Other properties'':+Right-click on the object in the object list and choose ''Other properties'':
  
 {{ gdevelop:tutorials:imagebeginnertutorial_56_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_56_.png?nolink |}}
Line 301: Line 301:
 {{ gdevelop:tutorials:imagebeginnertutorial_57_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_57_.png?nolink |}}
  
-A list of the available behaviors is displayed: Choose the ''Destroy when outside screen'' behavior:+A list of the available behaviors are displayed: Choose the ''Destroy when outside screen'' behavior:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_58_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_58_.png?nolink |}}
Line 319: Line 319:
 {{ gdevelop:tutorials:imagebeginnertutorial_51_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_51_.png?nolink |}}
  
-The background is displayed above the other objects :-( To change this, double click on it to display it properties. You can also make a right click on it and choose ''Properties'':+The background is displayed above the other objects :-( To change this, double click on it to display its properties. You can also make a right-click on it and choose ''Properties'':
  
 {{ gdevelop:tutorials:imagebeginnertutorial_52_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_52_.png?nolink |}}
  
- Simply change its Z order: Enter a negative number to ensure that the other objects ( which have a positive Z order ) will be displayed after the background. ( Objects with a greater Z order are displayed below the other objects. By default, the Z order of an object is simply 0 ).\\ + Simply change its Z-order: Enter a negative number to ensure that the other objects ( which have a positive Z-order ) will be displayed after the background. ( Objects with a greater Z-order are displayed below the other objects. By default, the Z-order of an object is simply 0 ).\\ 
-Also change the position of the object to set its X and Y coordinates to 0:+Alsochange the position of the object to set its X and Y coordinates to 0:
  
 {{ gdevelop:tutorials:imagebeginnertutorial_53_.png?nolink |}} {{ gdevelop:tutorials:imagebeginnertutorial_53_.png?nolink |}}
Line 335: Line 335:
  
 That's all for this tutorial! You can download the game [[http://www.compilgames.net/dl/BeginnerTutorialProject.zip|here]] if necessary, if you want to compare with your version or if something does not work. \\ That's all for this tutorial! You can download the game [[http://www.compilgames.net/dl/BeginnerTutorialProject.zip|here]] if necessary, if you want to compare with your version or if something does not work. \\
-enhanced version of the game is also in this archive. You can try it online: [[http://www.compilgames.net/games/EnhancedTutorial]]+An enhanced version of the game is also in this archive. You can try it online: [[http://www.compilgames.net/games/EnhancedTutorial]]
  
  
Line 341: Line 341:
  
 You can browse the others **[[gdevelop:tutorials|tutorials]]** or read the **[[gdevelop:documentation:manual:edit_getstart|Getting started page]]**.\\ You can browse the others **[[gdevelop:tutorials|tutorials]]** or read the **[[gdevelop:documentation:manual:edit_getstart|Getting started page]]**.\\
-There is also lots of examples bundled with GDevelop and templates available when you create a new game.+There are also lots of examples bundled with GDevelop and templates available when you create a new game.
  
 <note>If you have any problem, you can send a message on the [[http://www.forum.compilgames.net|official forum]].\\ <note>If you have any problem, you can send a message on the [[http://www.forum.compilgames.net|official forum]].\\
 If you have any remarks about the tutorial, do not hesitate to also send a message on the forum, or even fix the tutorial by yourself: You just have to create an account on the wiki 8-)</note> If you have any remarks about the tutorial, do not hesitate to also send a message on the forum, or even fix the tutorial by yourself: You just have to create an account on the wiki 8-)</note>