This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
item_pickup_tutorial [2018/03/07 20:47] – justin | item_pickup_tutorial [2018/03/07 20:58] (current) – justin | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Item Pickups====== | ======Item Pickups====== | ||
- | |||
- | (WIP) | ||
- | |||
This tutorial will explain how to set up map [[object|objects]] as [[item|items]] for the [[player_character|player]] to pick up, for example a key that the [[player_character|player]] can pick up by walking into/over it and then use to open a door or treasure chest. | This tutorial will explain how to set up map [[object|objects]] as [[item|items]] for the [[player_character|player]] to pick up, for example a key that the [[player_character|player]] can pick up by walking into/over it and then use to open a door or treasure chest. | ||
Line 23: | Line 20: | ||
{{: | {{: | ||
- | Remember the name you used for your item (including case) as it will be referenced in a [[quick script]] later on. Click the " | + | Remember the name you used for your item (including case) as it will be referenced in a [[quick script]] later on. Click the " |
=====Creating a Sound Effect===== | =====Creating a Sound Effect===== | ||
Line 37: | Line 34: | ||
{{: | {{: | ||
- | Switch into " | + | Switch into " |
{{: | {{: | ||
Line 66: | Line 63: | ||
</ | </ | ||
- | This line removes the physical key [[object]] from the scene by referring to the unique [[entity]] ID we assigned to the key earlier on in the [[Map Editor]]. The ID inside the quotes should exactly match the ID that was assigned to the [[object]] | + | This line removes the physical key [[object]] from the scene by referring to the unique [[entity]] ID we assigned to the key earlier on in the [[Map Editor]]. The ID inside the quotes should exactly match the ID that was assigned to the [[object]] from its [[Entity Properties]] dialog. |
<code lua> | <code lua> | ||
Line 80: | Line 77: | ||
This line puts the [[item]] named "Gold Key" into the [[player_character|player' | This line puts the [[item]] named "Gold Key" into the [[player_character|player' | ||
- | =====Testing | + | Click the " |
- | Finished! Save map and export | + | =====Testing the Pickup In-Game===== |
+ | [[exporting_your_game|Export the game]] to try out your new [[item]] pickup. The [[player_character|player]] should | ||
{{: | {{: | ||