locations, items, controls, proxemics, setting
This commit is contained in:
@@ -15,20 +15,25 @@
|
||||
<h2>move to pick up item </h2>
|
||||
<p>Items can only be picked up by the player. They can be picked up via item targeting or through selecting 'pick up' on the <a href="/blessfrey-gdd/inspect">inspect menu</a>. <br></p>
|
||||
<br>
|
||||
<p>Item pickup is triggered when a <a href="/blessfrey-gdd/floor-item">floor item</a> is targeted, that is, a 'target' (left-click) triggers a $Item/Body/Sprite/Sprite.gd/_on_input_event. If 'no_move_to_target' (shift) is held while targeting, the item will be targeted without initiating pickup. Otherwise, floor_item.gd/target_event(viewport,event,shape_idx) is called to set the target and handle the input before prompting the player to consider pickup. <br></p>
|
||||
<p>Item pickup is triggered when a <a href="/blessfrey-gdd/floor-item">floor item</a> is targeted, that is, a <a href="/blessfrey-gdd/controls">'target' (left-click)</a> triggers a $Item/Body/Sprite/Sprite.gd/_on_input_event. If 'no_move_to_target' (shift) is held while targeting, the <a href="/blessfrey-gdd/floor-item">floor item</a> will be targeted without initiating pickup. Otherwise, floor_item.gd/target_event(viewport,event,shape_idx) is called to set the target and handle the input before prompting the player to consider pickup. <br></p>
|
||||
<br>
|
||||
<p>Item pickup is also an option on the <a href="/blessfrey-gdd/floor-item">floor items</a>' <a href="/blessfrey-gdd/inspect">inspect menu</a>. Choosing it triggers that <a href="/blessfrey-gdd/floor-item">floor item</a>'s id_pressed(id), which calls the associated method from its inspect_options dictionary: floor_item.gd/move_player_then_pickup(), prompting the player to consider pickup. <br></p>
|
||||
<br>
|
||||
<p>Character.gd/consider_pickup(item) passes to UserControl/pickup(item). The next branch depends on a distance check. <br></p>
|
||||
<br>
|
||||
<p>If the item is within the player's <a href="/blessfrey-gdd/proxemics">intimate distance</a>, the character will be prompted to pick up the item.
|
||||
<p>If the <a href="/blessfrey-gdd/floor-item">floor item</a> is within the player's <a href="/blessfrey-gdd/proxemics">intimate distance</a>, the character will be prompted to pick up the <a href="/blessfrey-gdd/floor-item">floor item</a>. <br></p>
|
||||
<br>
|
||||
<p>Otherwise, <a href="/blessfrey-gdd/pathfinding">pathfinding</a> begins towards the <a href="/blessfrey-gdd/floor-item">floor item</a>. Upon arrival, it calls floor_item.pick_up().pick_up(). The <a href="/blessfrey-gdd/floor-item">floor item</a>'s pick_up removes itself from the room and returns the base item, then the <a href="/blessfrey-gdd/inventory">inventory system</a> takes care of the rest. <br></p>
|
||||
<br>
|
||||
<h2>drop item </h2>
|
||||
<p>Items can be dropped from the <a href="/blessfrey-gdd/inventory">inventory</a> app when the player selects 'drop' on the <a href="/blessfrey-gdd/inspect">inspect menu</a>. <br></p>
|
||||
<br>
|
||||
<p>Choosing 'drop' triggers that <a href="/blessfrey-gdd/inventory-item">inventory item</a>'s id_pressed(id), which calls the associated method from its inspect_options dictionary: inventory_item.gd/drop. It, in turn, calls the drop method off its <a href="/blessfrey-gdd/base-item">base item</a>.<br></p>
|
||||
<br>
|
||||
<p>The <a href="/blessfrey-gdd/base-item">base item</a>'s drop() emits the 'dropped' signal, which triggers the inventory item to queue_free then the inventory app to be refreshed. (connected @ InvContainer.gd/make_inventory_items(base_item).
|
||||
<br>
|
||||
<h2>challenges/known issues </h2>
|
||||
<p> <br></p>
|
||||
<p>pick up in range puts a floor item in the programmatic inventory. out of range puts a proper base item. STOP at line 309 on character.gd. <br></p>
|
||||
<br>
|
||||
<h2>works for...</h2>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user