Jump to content

Recommended Posts

Posted

I am trying too make a script based pop up menu, that only activates once, when an item is equipped. The menu buttons need too change the value of a custom variable in the same script. This way I can use that custom variable too change some part of the item equipped. Or more correctly, how it acts.

 

This is part of a Bow script that has a menu letting you select the type of arrows you want too use. They will be summoned arrows that use the players magicka too summon them.

 

The problem is, the "language" used for Papyrus scripts makes no sense too me. I'm too used too the old Oblivion and Morrowind script language.

 

attached is the oblivion menu script I'm trying too convert. This is only part of the bow script.

 

if ( messageOn == 2 )
MessageBox "Which Shell do you want to use?" "Dragon's Breath."   "Arctic Wind.""Thunder.""Viper Bite.""Void.""Vampire's Kiss.""Hammer Blow."
Set messageOn to 1
endif

if ( messageOn == 1 )
set button to GetButtonPressed
if ( button == 0 )
	; Dragon's Breath
	set arrowtype to 1
endif
if ( button == 1 )
	; Arctic Wind
	set arrowtype to 2
endif
if ( button == 2 )
	; Thunder
	set arrowtype to 3
endif
if ( button == 3 )
	; Viper Bite
	set arrowtype to 4
endif
if ( button == 4 )
	; Void
	set arrowtype to 5
endif
if ( button == 5 )
	; Vampire's Kiss
	set arrowtype to 6
endif
if ( button == 6 )
	; Hammer Blow
	set arrowtype to 0
endif
endif

Posted

Also curious about this, I'm a fairly poor scripter on a good day, but having to learn the new language at the same time is causing me a lot of trouble. MannequinActivatorSCRIPT has a menu with a button setup, but its all commented out and unused, and I haven't had much luck reproducing my own script from it.

 

My current script:

 

FormList Property AADAFlistIngredientsA auto
FormList Property AADAFlistIngredientsB auto

Message Property AADASorterLab Auto

Event OnTriggerActivate(ObjectReference akActivator)
If akActivator == Game.GetPlayer()
	AADASorterLab.show
	WaitMenuMode(0.1)
		if buttonpressed == 0
			Game.GetPlayer().RemoveItem(AADAFlistIngredientsA, true, IngredientsContA)
			Game.GetPlayer().RemoveItem(AADAFlistIngredientsB, true, IngredientsContB)
		elseif buttonpressed == 1
		endif
endif

EndEvent

 

I need to define the buttonpressed variables, but I'm also getting mismatch errors out the ass.

Posted
I'll just throw in a question here. I'm trying to setup Notepad++ to compile Papyrus and all that and I have to download Papyrus.xml from creationkit.com but I don't seem able to. What should I do?
Posted

this here kinda works...

however... you gotta hit the button more than once for some weird reason... it checks which you hit last tho lol

if someone knwos a workaround for that id be most grateful... otherwise it seems to work

 

Scriptname JSwordsDistributionQuestTrapScript extends Quest
{makes sure you downloaded this mod from nexus}

message property JSwordsDistributionQuestTrapMsg auto
quest property JSwordsDistributionQuestTrapForLoLzOnly auto

event OnInit()

int ibutton = JSwordsDistributionQuestTrapMsg.show()

if ibutton == 0
	debug.messagebox("1")
elseif ibutton == 1
	debug.messagebox("2")
else 
	debug.messagebox("3")
endif
JSwordsDistributionQuestTrapForLoLzOnly.stop()
endEvent

Posted
  Quote
OnInit is called at the following times:

For Quests and Aliases: On game startup, and again whenever the quest starts, due to the quest being reset.

 

If you mean your message shows up twice this could be why.

Posted

nah... the message showed up twice because i had "start game enabled" activated in my linked quest which seemed logical lol...

unchecking that fixed it and now it works but its still weird

  • Recently Browsing   0 members

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