Jump to content

Breadcrumbs?


DeeVee74

Recommended Posts

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

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

endif

end

 

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

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 by Ladez
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...