Alex150201 894 Posted December 3, 2016 Hello everyone, I have a question here. I started working on something that I considered really simple which turned out fast a bit more complicated. I've been continiously banging my head on my desk for the past hour so I decided to come over here where I would surely get help from some of the more talented folks out there. Basically how do I check if and what the player has selected in his inventory? For example: In this screenshot the player has selected the First Aid Kit. How do I check if he actually has done that? Share this post Link to post Share on other sites
Grumpy Old Man 3546 Posted December 3, 2016 What are you trying to do? Maybe there's a simpler solution. Cheers Share this post Link to post Share on other sites
Larrow 2822 Posted December 3, 2016 As GOM says explain what you want to do in more detail, if people know the reason and end result that your looking for then there maybe other ways to do it. This thread HERE may help. Example could do with updating to use the new inventory eventHandler but it still works. Share this post Link to post Share on other sites
haleks 8212 Posted December 3, 2016 Try with user interface EH, this is how I'd do it : while {true} do { waituntil {!(isnull (finddisplay 602))}; { ((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBSelChanged", "hint str _this"]; } count [633, 638, 619];//uniform, vest, backpack }; ... ninja'd :ph34r: 1 Share this post Link to post Share on other sites
Alex150201 894 Posted December 3, 2016 What I am simply trying to do is when you double click a certain item it opens up a dialog Share this post Link to post Share on other sites
haleks 8212 Posted December 3, 2016 In that case try the same examples we provided with the "LBDblClick" EH instead. Share this post Link to post Share on other sites
Alex150201 894 Posted December 3, 2016 Hey thank you everyone for your help the problem has been solved thanks to you guys. Here is the script for someone that will need it. while {true} do { waituntil {!(isnull (finddisplay 602))}; { ((findDisplay 602) displayCtrl _x) ctrlSetEventHandler ["LBDblClick", "if (""First Aid Kit"" == lbText [ctrlIDC (_this select 0), _this select 1]) then {createDialog ""AM_Telport_Dialog""};"]; } count [633, 638, 619]; }; 1 Share this post Link to post Share on other sites