Turn people into zombies

Image for post
Turning people into zombies is always fun and in this tutorial we will show you how.
We make use of two features that are really cool and open up many possibilities and fun ideas. These two features are ‘Loot component’ and ‘Presets’.
  • Select an asset you want to change into a zombie. Add ‘Loot component’.
  • Click the blue ‘Edit logic’ button if you are not seeing all the settings in the screenshot below.
If an asset with the ‘Loot component’ is killed it will drop/spawn the defined Preset in the example we made ‘COMMONZOMBv2’ preset. If this is your first time making presets then when you click the ‘Preset’ settings a window will pop up with nothing to select. That is because we need to make a preset and add it to our list. So let's learn how to do that.
Image for post
  • First, we need to put down our zombie we want to spawn. ‘Press L’ to bring up the ‘library’ and search for ‘zombie’ If you don’t see any zombies don’t worry you can find some lurking around in the ‘Marketplace’ along with many other assets. Check it out!
NOTE: Any assets you add from the marketplace will only show in the Game Maker Library after reloading the map. Once you have all the assets you need just restart the Game Maker to see them.
Image for post
  • Add the ‘Behaviour’ and ‘Components’ you wish your zombie to have. In this example, we added ‘Indicator component’ which Displays the message to the player ‘PICK ME UP
  • add ‘Pickable component’ so you can pick the zombie up with the interact button.
  • Let's create our ‘Preset’. Click the ‘Hierarchy’ button in the bottom left-hand corner. See the image below.
  • Find your zombie and click the hamburger icon.
  • Click ‘To Preset’ — You will notice other options. You can delete presets by clicking the ‘Delete Preset’ option instead.
Image for post
  • Click the ‘<Create New preset>’ then click the Next button. See below screenshot.
  • All done. You made your zombie preset! That wasn’t so hard, was it?
Image for post
Now let's add our person asset and apply the following Logic. See screenshot below.
  • Add ‘Health component’ to your asset so it can be killed.
  • Changed ‘Death Delay’ to ‘-2’ so the death is instant and zombie appears straight away.
  • Message to kill’ is used to trigger the death with messages instead of killing it in battle.
  • Add ‘Loot component’ then select your ‘Preset
Image for post
Now you should be able to kill your asset and see it change into a zombie!
There is so much that can be done using this system. Example: Killing a big Mob then 3 little mobs pop out when it dies. Have fun!