Jump to content

MCM Menu Refresh Toggle Option in Menu


maniczombie

Recommended Posts

I'm trying to create a menu that, when you toggle 1 option, a second option will toggle with it. Although it works in the background, the second toggle box does not show as being toggled until I exit the menu.

Is there a way to refresh the page without leaving it?

 

I'm adding follower support to my Helmet Toggle mod. Problem is hiding 1 helmet will hide all helmets of the same kind, so if a follower is wearing the same helmet as the player, I wish to toggle the player helmet as hidden then for the follower helmet to toggle and display as hidden also.

 

Here's a clip of my script.

event OnOptionSelect(int option)
	if (option == playerOID)
		playerVal = !playerVal
		SetToggleOptionValue(aOID, aVal)
		if playerVal == true
			game.getplayer().addspell(mz_ToggleSpell,false)
			CheckHelmet()
			if Helmet == Follower01Helmet
				Follower01.addspell(mz_ToggleSpell,false)
				CheckFollower01Helmet()
				follower01Val = 1
				SetToggleOptionValue(follower01OID, 1)
			endif
Link to comment
Share on other sites

Fixed it, Just changed the order and it seems to work now.

event OnOptionSelect(int option)
	if Helmet == Follower01Helmet
		if (option == playerOID)
			playerVal = !playerVal
			follower01Val = playerVal
			SetToggleOptionValue(playerOID, playerVal,true)
			SetToggleOptionValue(follower01OID, playerVal)
			game.getplayer().addspell(mz_ToggleSpell,false)
			CheckHelmet()
			Follower01.addspell(mz_ToggleSpell,false)
			CheckFollower01Helmet()
		endif
	endif
endEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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