INVENTORY.AUTOSELECT

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: INVENTORY.AUTOSELECT

Re: INVENTORY.AUTOSELECT

by phantombeta » Sun Dec 22, 2019 2:17 pm

Should this be closed?

Re: INVENTORY.AUTOSELECT

by Matt » Thu Nov 07, 2019 7:26 pm

Cherno wrote:Could be done in zScript directly in the relevant function that checks if an item is picked up and added to the actor. Simply check for the flag, and if the new owner is a PlayerBase, and set InvSel (or whatever the var is called) to the item if it's not already in the inventory.
Sounds about right, but how likely is this to desync something? It looks like there should be no reason why it would desync but I figured I'd ask anyway since I'm in the middle of yet another unsolvable-looks-perfectly-deterministic-but-desyncs-anyway impasse elsehwere.

Re: INVENTORY.AUTOSELECT

by Cherno » Thu Nov 07, 2019 3:46 pm

Could be done in zScript directly in the relevant function that checks if an item is picked up and added to the actor. Simply check for the flag, and if the new owner is a PlayerBase, and set InvSel (or whatever the var is called) to the item if it's not already in the inventory.

Re: INVENTORY.AUTOSELECT

by Gez » Thu Nov 07, 2019 3:37 pm

The issue here is that the gamesim has absolutely no awareness of the UI, and "selected inventory item" is a purely UI-side concept.

When you use an item, the UI doesn't tell the gamesim "player used selected item", it tells it "player used item X", and there's no difference whether it's by selecting the item and hitting the use key, or it's by a command for directly using that item, like the backspace key for using a tome of power in Heretic.

INVENTORY.AUTOSELECT

by Zan » Thu Nov 07, 2019 1:16 pm

Hello, I'd like to suggest an inventory flag that allows certain items to be auto selected in the inventory bar when picked up. I think this is feasible, right?

Thanks!

Top