User Tools

Site Tools


item_pickup_tutorial

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
item_pickup_tutorial [2018/03/07 20:47] justinitem_pickup_tutorial [2018/03/07 20:56] 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:
 {{:wiki:item_pickup_tut_define_item.gif?nolink|}} {{:wiki:item_pickup_tut_define_item.gif?nolink|}}
  
-Remember the name you used for your item (including case) as it will be referenced in a [[quick script]] later on. Click the "Save" button ({{:wiki:disk.png?nolink|}}) to save the changes to you've made to the [[item]] database.+Remember the name you used for your item (including case) as it will be referenced in a [[quick script]] later on. Click the "Save" button ({{:wiki:disk.png?nolink|}}) to save the changes you've made to the [[item]] database.
  
 =====Creating a Sound Effect===== =====Creating a Sound Effect=====
Line 37: Line 34:
 {{:wiki:item_pickup_tut_place_object.gif?nolink|}} {{:wiki:item_pickup_tut_place_object.gif?nolink|}}
  
-Switch into "Edit" mode, then either double-click the [[object]] (or right-click on it and select "Properties") to open the [[Entity Properties]] dialog. Enter a unique ID into the "Entity ID" box. I'm using "key_01" for this example since my map will contain multiple keys ("key_02", "key_03", etc.). This ID will also be referenced in our [[quick_script]] in the next step. Click OK to close the dialog. +Switch into "Edit" mode, then either double-click the [[object]] (or right-click on it and select "Properties") to open the [[Entity Properties]] dialog. Enter a unique ID into the "Entity ID" box. I'm using "key_01" for this example since my map will contain multiple keys ("key_02", "key_03", etc.). This ID will also be referenced in our [[quick script]] in the next step. Click OK to close the dialog. 
  
 {{:wiki:item_pickup_tut_assign_id.gif?nolink|}} {{:wiki:item_pickup_tut_assign_id.gif?nolink|}}
Line 80: Line 77:
 This line puts the [[item]] named "Gold Key" into the [[player_character|player's]] [[inventory]]. The name inside the quotes should exactly match the name defined in the [[Item Editor]]. Note that this line doesn't have a semicolon at the end since semicolons are used as line separators in the RPG in a Box scripting language and this is the last line of code. This line puts the [[item]] named "Gold Key" into the [[player_character|player's]] [[inventory]]. The name inside the quotes should exactly match the name defined in the [[Item Editor]]. Note that this line doesn't have a semicolon at the end since semicolons are used as line separators in the RPG in a Box scripting language and this is the last line of code.
  
-=====Testing the Pickup In-Game=====+Click the "Validate" button and then OK once the [[script]] has been validated, then save the [[map]].
  
-Finished! Save map and export gameplayer will now "pick up" key when walking onto the tile.+=====Testing the Pickup In-Game===== 
 +[[exporting_your_game|Export the game]] to try out your new [[item]] pickup. The [[player_character|player]] should now receive a Gold Key in their [[inventory]] when walking onto the [[tile]] that contains the key [[object]]!
  
 {{:wiki:item_pickup_tut_ingame.gif?nolink|}} {{:wiki:item_pickup_tut_ingame.gif?nolink|}}
  
item_pickup_tutorial.txt · Last modified: 2018/03/07 20:58 by justin