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
gdevelop5:tutorials:platformer:part-7 [2020/10/03 12:43]
davidturnbull
gdevelop5:tutorials:platformer:part-7 [2020/12/26 13:56] (current)
Line 1: Line 1:
 # Platformer Tutorial, Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies) # Platformer Tutorial, Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies)
  
-This part of the [Platformer Tutorial](#explains how the player can kill -- and be killed by -- the game's enemies.+This part of the tutorial explains how the player can kill -- and be killed by -- the game's enemies. 
 + 
 +## Series 
 + 
 +You are reading **Part 7** of the [[gdevelop5:tutorials:platformer:start|Platformer Tutorial]]. 
 + 
 +1. [[gdevelop5:tutorials:platformer:start|Platformer Tutorial, Part 1]] 
 +2. [[gdevelop5:tutorials:platformer:part-2|Platformer Tutorial, Part 2]] 
 +3. [[gdevelop5:tutorials:platformer:part-3|Platformer Tutorial, Part 3]] 
 +4. [[gdevelop5:tutorials:platformer:part-4|Platformer Tutorial, Part 4]] 
 +5. [[gdevelop5:tutorials:platformer:part-5|Platformer Tutorial, Part 5]] 
 +6. [[gdevelop5:tutorials:platformer:part-6|Platformer Tutorial, Part 6]] 
 +7. Platformer Tutorial, Part 7 
 +8. [[gdevelop5:tutorials:platformer:part-8|Platformer Tutorial, Part 8]] 
  
 ## Step 1: Kill the player ## Step 1: Kill the player
Line 13: Line 27:
 3. Add the **Is on floor** condition to the "Player" object. This ensures that the player only dies if they're on the platform (i.e. not jumping). 3. Add the **Is on floor** condition to the "Player" object. This ensures that the player only dies if they're on the platform (i.e. not jumping).
 4. Add the **Delete an object** action to the event that deletes the "Player" object. 4. Add the **Delete an object** action to the event that deletes the "Player" object.
 +
 +{{:gdevelop5:tutorials:platformer:07-01-kill-player.jpg|}}
  
 If you preview the game, running into the enemy will kill you. If you preview the game, running into the enemy will kill you.
 +
 +{{:gdevelop5:tutorials:platformer:07-02-killing-player-preview.gif|}}
  
 ## Step 2: Kill the enemy ## Step 2: Kill the enemy
Line 26: Line 44:
 3. Add the **Is falling** condition to the "Player" object. This ensures that the enemy only dies if the player is jumping (i.e. not on the platform). 3. Add the **Is falling** condition to the "Player" object. This ensures that the enemy only dies if the player is jumping (i.e. not on the platform).
 4. Add the **Delete an object** action to the event that deletes the "Slime" object. 4. Add the **Delete an object** action to the event that deletes the "Slime" object.
 +
 +{{:gdevelop5:tutorials:platformer:07-03-kill-enemy.jpg|}}
  
 If you preview the game, you can jump on the enemy to kill them. If you preview the game, you can jump on the enemy to kill them.
 +
 +{{:gdevelop5:tutorials:platformer:07-04-killing-enemy-preview.gif|}}
  
 ## (Optional) Step 3: Bounce on the enemy's head ## (Optional) Step 3: Bounce on the enemy's head
Line 36: Line 58:
  
 1. Add the **Allow again jumping** action to the "Player" object. 1. Add the **Allow again jumping** action to the "Player" object.
-2. Add the **Simulate jump key press action** action to the "Player" object.+2. Add the **Simulate jump key press** action to the "Player" object. 
 + 
 +{{:gdevelop5:tutorials:platformer:07-05-bounce-kill.jpg|}}
  
 If you preview the game, you'll bounce on the enemy's head when killing them. If you preview the game, you'll bounce on the enemy's head when killing them.
 +
 +{{:gdevelop5:tutorials:platformer:07-06-killing-enemy-bounce-preview.gif|}}
  
 ## Next step ## Next step
  
-Read [Platformer Tutorial, Part 8](#).+Read [[gdevelop5:tutorials:platformer:part-8|Platformer Tutorial, Part 8]].