DeeVee74 Posted December 12, 2014 Share Posted December 12, 2014 I have a tendency to get lost in some underground locations, but have started using specific garbage to mark my way. Namely, cigarette butts from Light Up & Smoke.Sure, for RP purposes, any of the enemies I've made in NVB can figure out where I've been, but they seem to do that anyway. This just lends explanation.Now, is there a way to hot key a drop of a specific item? Can someone help me script that? Link to comment Share on other sites More sharing options...
senterpat Posted December 14, 2014 Share Posted December 14, 2014 I have a tendency to get lost in some underground locations, but have started using specific garbage to mark my way. Namely, cigarette butts from Light Up & Smoke.Sure, for RP purposes, any of the enemies I've made in NVB can figure out where I've been, but they seem to do that anyway. This just lends explanation.Now, is there a way to hot key a drop of a specific item? Can someone help me script that?It'd be pretty simple, something Begin GameMode if getButtonPressed == 12 if player.getitemcount MyBreadCrumb player.placeatme MyBreadCrumb 1 player.remove item MyBreadCrumb 1 1 else MessageBoxEx "You don't have any bread crumbs." endif endifend that't the basic idea, look at a mod that adds hotkeys, such as the grenade hotkey mod, for a better example script. Link to comment Share on other sites More sharing options...
Ladez Posted December 14, 2014 Share Posted December 14, 2014 (edited) Just a few notes to senterpat's script:GetButtonPressed is used to detect which button is pressed on a message box, not to detect keypresses.PlaceAtMe will leave lots of undesired references in the gameworld, causing savegame bloat. Better use Drop instead.There's no control variable to prevent the script from running dozens of times as soon as the key is pressed. I've revised it to this: short bPressed Begin GameMode If Eval IsKeyPressed 12 && !bPressed If Player.GetItemCount MyBreadCrumb Player.Drop MyBreadCrumb 1 Else MessageBoxEx "You don't have any bread crumbs." EndIf Let bPressed := 1 ElseIf Eval !IsKeyPressed 12 && bPressed Let bPressed := 0 EndIf End Edited December 14, 2014 by Ladez Link to comment Share on other sites More sharing options...
Recommended Posts