Jump to content

TimThe7th

Premium Member
  • Posts

    4
  • Joined

  • Last visited

Everything posted by TimThe7th

  1. Is there any way to actually show message boxes while the player is in the stats menu? When I open the box in the menu without a utility.wait() at all, I can get the message boxes to show up over a black screen before showing the stats menu. When I do use utility.wait(), they only show up after the menu is closed. Is it possible to show them while the menu is open?
  2. I'm trying to pull up the stats menu under certain circumstances--for now, when the "ready Weapon" button is pressed, but I may change that later. Regardless, I believe it requires me to fake a key press, and I'm getting stumped. If it's not mapped to a valid key, it will crash (and it has). So using a messagebox, I'm trying to check the key assignment. But no matter where I assign the Stats Menu, it always shows -1. I've tried P, ?/, Q, and other valid assignments, but it's returning -1 consistently. Script is below--it's just getting started, so there's not much, but that's probably for the better. Scriptname _CharAssign extends Quest Import Game Import Actor Import Utility ; ---------- Get Mapped Key Int iStatsMenu ; ---------- Events Event OnInit() RegisterForControl("Quick Stats") RegisterForControl("Ready Weapon") RegisterForMenu("StatsMenu") endEvent Event OnControlDown(string control) If control == "Ready Weapon" Utility.Wait(1) iStatsMenu = Input.GetMappedKey("StatsMenu") Utility.Wait(1) ;Input.TapKey(iStatsMenu) debug.messagebox(iStatsMenu) EndIf EndEvent Event OnMenuOpen(String MenuName) Utility.Wait(1) Debug.MessageBox("Test") EndEvent
  3. That worked. I knew it was a stupid rookie mistake. I specifically recall auto-filling all properties (which is what was needed), but I tend to cancel out instead of clicking ok on every box. I ran into this issue several times when doing tutorials. Hopefully my muscle memory gets better as I continue to code. Thanks for your help, canĂ¢t believe I spent two hours trying to troubleshoot this.
  4. I'm pretty new to papyrus, so I'm sure I'm making some rookie mistake. Trying to show certain messages based on race--I have race properties and for the most part it seems to work right. But regardless of what race I am, it shows Dark Elf. I suspect it's just using the first if statement, ignoring the ElseIfs, as when I swap the Nord for the Dark Elf it shows the message box for the Nord. Obviously this only really works for Dunmer/Nords, any other race will show Imperial (I'll add them eventually), but even noting that it's not functioning correctly. Any clue what's wrong with the first If in the function? Scriptname SkillAssign extends ObjectReference Import Game Import Actor Import Utility ; Message Boxes Message Property ccDunmerInfo Auto Message Property ccImperialInfo Auto Message Property ccNordInfo Auto ; Races Race Property ArgonianRace Auto Race Property BretonRace Auto Race Property DarkElfRace Auto Race Property HighElfRace Auto Race Property ImperialRace Auto Race Property KhajiitRace Auto Race Property NordRace auto Race Property OrcRace Auto Race Property RedguardRace Auto Race Property WoodElfRace Auto ; Other Actor Property PlayerRef Auto ; Events Event OnActivate(ObjectReference akActionRef) RaceMenu() EndEvent ; Functions Function RaceMenu(int aiButton = 0) Race pRace = PlayerRef.GetRace() If pRace == DarkElfRace aiButton = ccDunmerInfo.show() ElseIf pRace == NordRace aiButton = ccNordInfo.show() Else aiButton = ccImperialInfo.show() EndIf If aiButton == 0 ElseIf aiButton == 1 ShowRaceMenu() EndIf EndFunction Edit: Tried replacing it with this much simpler function and it still shows "Dunmer": ; Functions Function RaceMenu() Race pRace = PlayerRef.GetRace() If pRace == DarkElfRace Debug.MessageBox("Dunmer") ElseIf pRace == NordRace Debug.MessageBox("Nord") Else Debug.MessageBox("Other") EndIf EndFunction
×
×
  • Create New...