item disappearing after dialog

Users who are viewing this thread

DtheHun

Sergeant Knight
Hi,
I try to make a scene, with usable spawned items, and there are triggered dialogs during the mission. My problem is; after dialogs, player character unequipes his spawned shield, and the item disappears. Looks like, dialogs resets the staring equipment. Are there any way to disable this, and keep the new items after talking? 
 
Is this a dialog, that loads vanilla conversation scene? Then on scene changes your character troop will lose all the items that are not in his inventory. You may want to load dialog presentation w/o jumping to conversation scene. Some additional camera positioning will be needed, but picked up items might be ok.

If by a strange twist of engine they are not, then you can store eqipped item IDs, add them to player troop inventory and kill then respawn your characher after the dialog.

EDIT: (agent_get_wielded_item,<dest>,":player_agent",0/1),  to read what's in your hands
 
Thanks,
I do not know how to load presetation to simulate vanilla conversation, so I use the original "start_mission_conversation " command.

I will try to add the new item to the inventory when the player equips the spawn item.
I think about a trigger like:

agent_has_item_equipped
neg|player_has_item
            |
            V
troop_add_item

I know there is a "troop_equip_items" command what try equip on the whole inventory, but how can I equip a specific item?

 
Umm, you better learn how to fire up a conversation in a current scene, I guess. Far less hassle.
I'm not knowledgeable in this department to help immediately.

Will  (change_screen_map_conversation, <troop_id>)  help?
 
Starting dialog is not problem, just it's results. Strange armor set is not spawned, they are inside chests. Player will not has access to inventory while he is in the scene. 

change_screen_map_conversation do not work inside the scene, but agent_get_wielded_item  was useful. With this trigger:

    (0, 0, 0, [(try_begin),
                  (get_player_agent_no, ":player_agent"),
                  (agent_get_wielded_item,":item",":player_agent",1),
                  (neg|player_has_item,":item"),
                  (troop_add_item,"trp_player",":item",0),
                ], []),

player gets the item when equips it, and not has already in the inventory.
Unfortunately after conversation player unequips it and can not equip it again inside the scene, but when I leave the scene, the item is in the inventory, so player has it under the conversation too. So, the problem is not about "has or not has" that item.

"troop_add_item" gets the item to player's inventory, looks like it is not enough.
Are there any script that assigns the item directly into one of the players equipment slots?



 
Back
Top Bottom