Jump to content

Inventory Dialogue Buttons


Gersendai

Recommended Posts

Ok, I am making a mod that allows you to create ammo (nothing personal to others, I just didnt like most other peoples versions of it) and I was wondering:

 

How do I make it so that when I 'equip' an item from my inventory, it pops up a message window, as if activating a workbench, and makes it so you can click the buttons there and whatnot?

 

If I could have a good set of code for this, id be set.

Also, if someone can give me a good example of code for extending my button choices on just one item, id be most happy.

Link to comment
Share on other sites

I've written a tutorial about this over on the GECK Wiki - Adding an Options Menu

 

You'll probably want to ignore most of the first section, "Setting Up Your Plugin To Use An Options Menu", and you'll want to ignore the scripting I've done to make the menu open only after the Pip-Boy has been closed, but apart from that it's probably just what you're looking for.

 

Cipscis

Link to comment
Share on other sites

It might just be me, but, I think that looks just a little too complex for me -.- and I already have the massive majority of my mod completed... I would consider releasing it now if people werent annoyed by the fact I dont have it setup to tork inside of the inventory.

 

That tut looks useful, but, I cant make heads or tails of it @.@

 

My mod is practically a replica of a regular work bench right now, so i have 3 tools to create all the different ammo types and 2 other tools to create other components for it...

 

http://files.filefront.com/Gersendais+Ammo...;/fileinfo.html

 

This is basically my plugin as it is.

All I really want to do is make it all into maybe one tool used in the inventory to do all the same functions and create what i need.

I guess as i am im just not smart enough to figure the rest out.

Link to comment
Share on other sites

If you don't need to bother creating a new menu, then the "Giving The Player Access To The Menu" section could help you.

 

The basic concept is that when the item is equipped, it adds a token (an unplayable, therefore invisible, piece of armour) to the player's inventory. This token calls ShowMessage in an OnAdd block, and GetButtonPressed in a GameMode block.

 

If you can already open the menu by activating something, then just use something like this:

Begin OnEquip
OpenMenuRef.MoveTo player
OpenMenuRef.Disable
OpenMenuRef.Activate player 1
End

Where "OpenMenuRef" is a persistent reference initially placed in a dummy cell. The MoveTo and Disable moves it to the player so that GameMode/MenuMode blocks will run.

 

Note that if the menu code is currently only in a GameMode block, it'll have to be copied into a MenuMode block as well in order to run correctly in the Pip-Boy menu.

 

Cipscis

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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