Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Help with layered menu


Mysterious Mr. Bear
 Share

Recommended Posts

Hi everyone,

I've been trying to create a layered menu, so you activate something, you are presented with a selection of choices, then when you choose one, it gives you more choices. I could do this in Oblivion with Gamemode, but that is gone and everything works differntly... Could anyone help? there was a tutorial somewhere on the internet but I cant find it ANYWHERE now.

This is my script so far, the activator works, and when you choose something the second menu appears, but then no matter what you choose there nothing happens which makes me think that the onupdate part of the script is not working.

Scriptname AAMBCtestSCRIPT extends ObjectReference  

{Creates Bearpaw Camp, piece by piece.}


Message Property Campingmessage  Auto  

{Dialoge to build tents}


Message Property Strucuremessage  Auto  

{Dialouge to build wooden structures}


Message Property Defencemessage  Auto  

{Dialoge to add defences}


Message Property Utilitymessage  Auto  

{Dialouge to build utilities}


Message Property ChoiceMessage  Auto  

{Dialouge to choose upgrade type}


AAMBcUPGRADEtentSCRIPT property campquestref auto


int button

int level

objectreference lakeside1a

objectreference lakeside1b

objectreference lakeside1c

objectreference lakeside1d

objectreference lakeside1e

objectreference lakeside1f


EVENT OnActivate (ObjectReference akActionRef)

registerForUpdate(5)

if akActionRef == game.getplayer()

	level = 0

	button = ChoiceMessage.show ()

	if button == 0

		level = 1

		button = campingmessage.show (afArg1 = campquestref.Lakesidecamp)	

	elseif button == 1

		level = 2

		button = Strucuremessage.show ()

	elseif button == 2

		level = 3

		button = Utilitymessage.show ()

	elseif button == 3

		level = 4

		BUTTON = Defencemessage.show ()

	endif

endif

endEVENT


Event onupdate ()

if level == 1

	if button == 0

		if campquestref.Lakesidecamp == 0

			campquestref.Lakesidecamp = 1

			lakeside1a. enable()

			lakeside1b. enable()

			lakeside1c. enable()

			lakeside1d. enable()

			lakeside1e. enable()

			lakeside1f. enable()

			level = 0

		endif

	endif

endif

endevent

Any help with this or a link to some tutorial would be of great use, I know it can be done as mods like Frostfall use it extensively...

Link to comment
Share on other sites

an answer has been provided by Tunaisafish a the nexus forums- here it is for anyone who has this same problem

http://forums.nexusmods.com/index.php?/topic/606255-drop-item-script-not-working/page__view__findpost__p__4837489

When I get my own version working I will place it in the code snippet section :)

Mysterious Mr. Bear :D :D

Link to comment
Share on other sites

If anyone reading this with a bit of time on their hands would be kind enough to help me with enabling objects through script though... that would be so much help! :S I feel like I did when I first started with oblivion :S

EDIT: happy to say I worked that out too. Found it hard to use the equivilant of ref variables- have to be declared in script as "objectreference property "x" auto" and then linked through managing properties in the CK.

Edited by Mysterious Mr. Bear
Link to comment
Share on other sites

yep, that is how I explain in script class one to point to object in your game.

I also made a nice script for menus.

I am using a 'while' loop so I can go back to the first menu. But you can just go from top to bottom if you want.


Event OnActivate(ObjectReference akActionRef)
If akActionRef == Game.GetPlayer()
PlayAnimationAndWait("Trigger01","done")
myState = 1
while myState > 0
Button1 = LevelersArrowQ1MSG.Show()
if Button1 == 0
; *Store arrows*
myState = 0
myArrow = LevelersArrowGBL.GetValue() as int
if myArrow == 0
Game.GetPlayer().RemoveItem(IronArrow, 999, true, ArrowContainerREF)
elseif myArrow == 1
Game.GetPlayer().RemoveItem(DwarvenArrow, 999, true, ArrowContainerREF)
elseif myArrow == 2
Game.GetPlayer().RemoveItem(ElvenArrow, 999, true, ArrowContainerREF)
elseif myArrow == 3
Game.GetPlayer().RemoveItem(ForswornArrow, 999, true, ArrowContainerREF)
endif
LevelersArrowStoreMSG.Show()
elseif Button1 == 1
; *Exclude arrow*
Button2 = LevelersArrowQ2MSG.Show()
myState = 0
if Button2 == 0
LevelersArrowGBL.SetValue(1)
LevelersArrowSetMSG.Show()
elseif Button2 == 1
LevelersArrowGBL.SetValue(2)
LevelersArrowSetMSG.Show()
elseif Button2 == 2
LevelersArrowGBL.SetValue(3)
LevelersArrowSetMSG.Show()
elseif Button2 == 4
myState = 2
Button3 = LevelersArrowQ3MSG.Show()
myState = 0
if Button3 == 0
LevelersArrowGBL.SetValue(7)
LevelersArrowSetMSG.Show()
elseif Button3 == 1
LevelersArrowGBL.SetValue(8)
LevelersArrowSetMSG.Show()
elseif Button3 == 2
LevelersArrowGBL.SetValue(9)
LevelersArrowSetMSG.Show()
endif
elseif Button2 == 7
myState = 0
endif
elseif Button1 == 2
myState = 0
endif
endwhile
endif
endEvent
[/CODE]

Link to comment
Share on other sites

Oh man I must have missed that!!! I was going through that class as well, I used it as a base and a guide. I was going to comment on how good it was but I'll save clogging the space- it was very good! Doesn't skip over anything or take knowlege for granted, which was really useful.

Did I miss that menu script too, or have you not put that up anywhere? Because I scoured the papyrus 101 forum and the script tidbits forum, and I took a look through the study hall... I try to work things out/search before asking. And I ALWAYS then work it out straight after :P

Link to comment
Share on other sites

The first class deals with attaching properties of objects in the game, to your script. So you can manipulate them in the script. ;)

I heavily edited that script from its original form in my Levelers Mod. So it has not been placed anywhere yet.

What it does is either 'store' all your selected arrows, or allows you to select one arrow type to not store automatically.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...