Jump to content

aoh125

Recommended Posts

~~Soloved (i think s: )

 

Im back looking for some guidance on another scripting issue.

 

I have a large collection of static weapons place that are intially disabled and want to activate them when an item with matching keywords is added to a container. Now i got it working on a small scale exactly how i had hope but then trying to get a single script to do checks for 80 at the moment weapons has been a problem. Ill list my prof of concept script and then the one im trying to get working.

 

 

 
ObjectReference Property BMI_TDS01 Auto
 
Keyword Property WeapMaterialElven Auto
Keyword Property WeapTypeSword Auto
Keyword Property VendorItemWeapon Auto
 
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
 If akBaseItem.HasKeyword(VendorItemWeapon)
  If (Self.GetItemCount(WeapTypeSword) >= 1)
   If (Self.GetItemCount(WeapMaterialElven) >= 1)
    BMI_TDS01.Enable()
   EndIf
  EndIf
 EndIf
EndEvent
 
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
 If akBaseItem.HasKeyword(VendorItemWeapon)
  If akBaseItem.HasKeyword(WeapTypeSword)
   If akBaseItem.HasKeyword(WeapMaterialElven)
    If (Self.GetItemCount(WeapMaterialElven) < 1) && (Self.GetItemCount(WeapTypeSword) < 1)
     BMI_TDS01.Disable()
    EndIf
   EndIf
  EndIf
 EndIf
EndEvent

 

 

 

 

 

;Bow ObjectReference Properties
 
ObjectReference Property BMI_DaeBWDisplay Auto
ObjectReference Property BMI_DraBWDisplay Auto
ObjectReference Property BMI_DwaBWDisplay Auto
ObjectReference Property BMI_EboBWDisplay Auto
ObjectReference Property BMI_ElvBWDisplay Auto
ObjectReference Property BMI_GlaBWDisplay Auto
ObjectReference Property BMI_IroBWDisplay Auto
ObjectReference Property BMI_OrcBWDisplay Auto
ObjectReference Property BMI_SteBWDisplay Auto
ObjectReference Property BMI_StaBWDisplay Auto
 
;BattleAxe ObjectReference Properties
 
ObjectReference Property BMI_DaeBatDisplay Auto
ObjectReference Property BMI_DraBatDisplay Auto
ObjectReference Property BMI_DwaBatDisplay Auto
ObjectReference Property BMI_EboBatDisplay Auto
ObjectReference Property BMI_ElvBatDisplay Auto
ObjectReference Property BMI_GlaBatDisplay Auto
ObjectReference Property BMI_IroBatDisplay Auto
ObjectReference Property BMI_OrcBatDisplay Auto
ObjectReference Property BMI_SteBatDisplay Auto
ObjectReference Property BMI_StaBatDisplay Auto
 
;Dagger ObjectReference Properties
 
ObjectReference Property BMI_DaeDADisplay Auto
ObjectReference Property BMI_DraDADisplay Auto
ObjectReference Property BMI_DwaDADisplay Auto
ObjectReference Property BMI_EboDADisplay Auto
ObjectReference Property BMI_ElvDADisplay Auto
ObjectReference Property BMI_GlaDADisplay Auto
ObjectReference Property BMI_IroDADisplay Auto
ObjectReference Property BMI_OrcDADisplay Auto
ObjectReference Property BMI_SteDADisplay Auto
ObjectReference Property BMI_StaDADisplay Auto
 
;GreatSword ObjectReference Properties
ObjectReference Property BMI_DaeGSDisplay Auto
ObjectReference Property BMI_DraGSDisplay Auto
ObjectReference Property BMI_DwaGSDisplay Auto
ObjectReference Property BMI_EboGSDisplay Auto
ObjectReference Property BMI_ElvGSDisplay Auto
ObjectReference Property BMI_GlaGSDisplay Auto
ObjectReference Property BMI_IroGSDisplay Auto
ObjectReference Property BMI_OrcGSDisplay Auto
ObjectReference Property BMI_SteGSDisplay Auto
ObjectReference Property BMI_StaGSDisplay Auto
 
;Mace ObjectReference Properties
 
ObjectReference Property BMI_DaeMADisplay Auto
ObjectReference Property BMI_DraMADisplay Auto
ObjectReference Property BMI_DwaMADisplay Auto
ObjectReference Property BMI_EboMADisplay Auto
ObjectReference Property BMI_ElvMADisplay Auto
ObjectReference Property BMI_GlaMADisplay Auto
ObjectReference Property BMI_IroMADisplay Auto
ObjectReference Property BMI_OrcMADisplay Auto
ObjectReference Property BMI_SteMADisplay Auto
ObjectReference Property BMI_StaMADisplay Auto
 
;Sword ObjectReference Properties
 
ObjectReference Property BMI_DaeSWDisplay Auto
ObjectReference Property BMI_DraSWDisplay Auto
ObjectReference Property BMI_DwaSWDisplay Auto
ObjectReference Property BMI_EboSWDisplay Auto
ObjectReference Property BMI_ElvSWDisplay Auto
ObjectReference Property BMI_GlaSWDisplay Auto
ObjectReference Property BMI_IroSWDisplay Auto
ObjectReference Property BMI_OrcSWDisplay Auto
ObjectReference Property BMI_SteSWDisplay Auto
ObjectReference Property BMI_StaSWDisplay Auto
 
;WarAxe ObjectReference Properties
 
ObjectReference Property BMI_DaeWADisplay Auto
ObjectReference Property BMI_DraWADisplay Auto
ObjectReference Property BMI_DwaWADisplay Auto
ObjectReference Property BMI_EboWADisplay Auto
ObjectReference Property BMI_ElvWADisplay Auto
ObjectReference Property BMI_GlaWADisplay Auto
ObjectReference Property BMI_IroWADisplay Auto
ObjectReference Property BMI_OrcWADisplay Auto
ObjectReference Property BMI_SteWADisplay Auto
ObjectReference Property BMI_StaWADisplay Auto
 
;WarHammer ObjectReference Properties
ObjectReference Property BMI_DaeWHDisplay Auto
ObjectReference Property BMI_DraWHDisplay Auto
ObjectReference Property BMI_DwaWHDisplay Auto
ObjectReference Property BMI_EboWHDisplay Auto
ObjectReference Property BMI_ElvWHDisplay Auto
ObjectReference Property BMI_GlaWHDisplay Auto
ObjectReference Property BMI_IroWHDisplay Auto
ObjectReference Property BMI_OrcWHDisplay Auto
ObjectReference Property BMI_SteWHDisplay Auto
ObjectReference Property BMI_StaWHDisplay Auto
 
;Keyword Properties Material Types
 
Keyword Property WeapMaterialDaedric Auto
Keyword Property DLC1WeapMaterialDragonbone Auto
Keyword Property WeapMaterialDwarven Auto
Keyword Property WeapMaterialEbony Auto
Keyword Property WeapMaterialElven Auto
Keyword Property WeapMaterialGlass Auto
Keyword Property WeapMaterialIron Auto
Keyword Property WeapMaterialOrcish Auto
Keyword Property WeapMaterialSteel Auto
Keyword Property DLC2WeaponMaterialStalhrim Auto
 
;Keyword Properties Weapon Types
 
Keyword Property WeapTypeBattleaxe Auto
Keyword Property WeapTypeBow Auto
Keyword Property WeapTypeDagger Auto
Keyword Property WeapTypeGreatsword Auto
Keyword Property WeapTypeMace Auto
Keyword Property WeapTypeSword Auto
Keyword Property WeapTypeWarAxe Auto
Keyword Property WeapTypeWarhammer Auto
 
 
Keyword Property VendorItemWeapon Auto
 
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
   If akBaseItem.HasKeyword(VendorItemWeapon)
      WeapTypeCheck()
   EndIf
EndEvent
 
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
   If akBaseItem.HasKeyword(VendorItemWeapon)
      WeapTypeCheck()
   EndIf
EndEvent
 
Function WeapTypeCheck() ;Checks Keywords for Type of Weapon then Sends it to Check Material Type
 If Self.HasKeyword(WeapTypeBattleaxe)
  WeapMatCheckBat()
 ElseIf Self.HasKeyword(WeapTypeBow)
 
 ElseIf Self.HasKeyword(WeapTypeDagger)
 
 ElseIf Self.HasKeyword(WeapTypeGreatsword)
 
 ElseIf Self.HasKeyword(WeapTypeMace)
 
 ElseIf Self.HasKeyword(WeapTypeSword)
 
 ElseIf Self.HasKeyword(WeapTypeWarAxe)
 
 ElseIf Self.HasKeyword(WeapTypeWarhammer)
 
 EndIf
EndFunction
 
Function WeapMatCheckBat() ; Checks Keywords to find out Material Type and then Sends it to enable Displays
 If Self.HasKeyword(WeapMaterialDaedric)
  DaeBatEnaDis()
 ElseIf Self.HasKeyword(DLC1WeapMaterialDragonbone)
  DraBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialDwarven)
  DwaBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialEbony)
  EboBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialElven)
  ElvBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialGlass)
  GlaBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialIron)
  IroBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialOrcish)
  OrcBatEnaDis()
 ElseIf Self.HasKeyword(WeapMaterialSteel)
  SteBatEnaDis()
 ElseIf Self.HasKeyword(DLC2WeaponMaterialStalhrim)
  StaBatEnaDis()
 EndIf
EndFunction
 
Function DaeBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialDaedric) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_DaeBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialDaedric) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_DaeBatDisplay.Disable()
 EndIf
EndFunction
 
Function DraBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(DLC1WeapMaterialDragonbone) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_DraBatDisplay.Enable()
 ElseIf (Self.GetItemCount(DLC1WeapMaterialDragonbone) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_DraBatDisplay.Disable()
 EndIf
EndFunction
 
Function DwaBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialDwarven) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_DwaBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialDwarven) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_DwaBatDisplay.Disable()
 EndIf
EndFunction
 
Function EboBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialEbony) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_EboBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialEbony) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_EboBatDisplay.Disable()
 EndIf
EndFunction
 
Function ElvBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialElven) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_ElvBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialElven) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_ElvBatDisplay.Disable()
 EndIf
EndFunction
 
Function GlaBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialGlass) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_GlaBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialGlass) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_GlaBatDisplay.Disable()
 EndIf
EndFunction
 
Function IroBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialIron) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_IroBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialIron) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_IroBatDisplay.Disable()
 EndIf
EndFunction
 
Function OrcBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialOrcish) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_OrcBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialOrcish) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_OrcBatDisplay.Disable()
 EndIf
EndFunction
 
Function SteBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(WeapMaterialSteel) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_SteBatDisplay.Enable()
 ElseIf (Self.GetItemCount(WeapMaterialSteel) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_SteBatDisplay.Disable()
 EndIf
EndFunction
 
Function StaBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
 If (Self.GetItemCount(DLC2WeaponMaterialStalhrim) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
  BMI_StaBatDisplay.Enable()
 ElseIf (Self.GetItemCount(DLC2WeaponMaterialStalhrim) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
  BMI_StaBatDisplay.Disable()
 EndIf
EndFunction

 

 

 

The second script doesnt activate any of the display items and while i realize it is missing parts. the parts that are there are listed first and so should fire and work since thats the case? already had a few other failed attempts at this so just dont want to do all 80 items until i have a known to work format for it. thanks in advance for any help.

 

Not sure if its worth noting but both compile fine its just the functionality of the second isnt there for some reason. Also all the properties are correct. i have the exact same ones used in another script to mass disable and enable for testing so that wasnt the issue here Dx

 

~~Solution~~ Seems like just droping the individual item functions into the event without the weapontype and materialtype checks will do the trick, just hope it continues to scale unlike the chain of if statements i first tried lol.

^ Doesnt remove the items properly

Make 80 Formlist's seems like the solution here.

Edited by aoh125
Link to comment
Share on other sites

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Without testing anything here and at 1st glance. It kind of looks like you're splitting them up by category a few times.

Type and Material ... then in the end calling each one individually anyways to check/set enable status.

 

I take it there is only one weapon of each type on the weapon wall.

Why not just do the check/set enable status part only ...

 

If steel ax in chest enable steel ax else disable steel ax ... and so on.

Edited by NexusComa
Link to comment
Share on other sites

Yea thats where im at more or less but the way i was doing it until i had this brilliant formlist idea which isnt working out after making 80 formlists lol. problem with setting it to the keywords is if its checking to disable and it has ether a axe or steel material item it will still pass a > 0 check for 1 of the 2 and wont disable unless all axes and steel items are not in the container. no idea why making a formlist with weapon type and materal type for each one isnt working but it isnt.

Link to comment
Share on other sites

If i made each type of weapon or material have its own container to activate and deactivate it then it wouldnt be an issue but the fact that i want them all to get both activated and deactivated from one chest is whats complicating things at this point. just a second ill ctrl Z back to the all but disable working code i had before this formlist failure and post that.

 

 

 

Scriptname zzzBMI_TestingScript extends ObjectReference  
 
;Bow ObjectReference Properties
 
ObjectReference Property BMI_DaeBWDisplay Auto
ObjectReference Property BMI_DraBWDisplay Auto
ObjectReference Property BMI_DwaBWDisplay Auto
ObjectReference Property BMI_EboBWDisplay Auto
ObjectReference Property BMI_ElvBWDisplay Auto
ObjectReference Property BMI_GlaBWDisplay Auto
ObjectReference Property BMI_IroBWDisplay Auto
ObjectReference Property BMI_OrcBWDisplay Auto
ObjectReference Property BMI_SteBWDisplay Auto
ObjectReference Property BMI_StaBWDisplay Auto
 
;BattleAxe ObjectReference Properties
 
ObjectReference Property BMI_DaeBatDisplay Auto
ObjectReference Property BMI_DraBatDisplay Auto
ObjectReference Property BMI_DwaBatDisplay Auto
ObjectReference Property BMI_EboBatDisplay Auto
ObjectReference Property BMI_ElvBatDisplay Auto
ObjectReference Property BMI_GlaBatDisplay Auto
ObjectReference Property BMI_IroBatDisplay Auto
ObjectReference Property BMI_OrcBatDisplay Auto
ObjectReference Property BMI_SteBatDisplay Auto
ObjectReference Property BMI_StaBatDisplay Auto
 
;Dagger ObjectReference Properties
 
ObjectReference Property BMI_DaeDADisplay Auto
ObjectReference Property BMI_DraDADisplay Auto
ObjectReference Property BMI_DwaDADisplay Auto
ObjectReference Property BMI_EboDADisplay Auto
ObjectReference Property BMI_ElvDADisplay Auto
ObjectReference Property BMI_GlaDADisplay Auto
ObjectReference Property BMI_IroDADisplay Auto
ObjectReference Property BMI_OrcDADisplay Auto
ObjectReference Property BMI_SteDADisplay Auto
ObjectReference Property BMI_StaDADisplay Auto
 
;GreatSword ObjectReference Properties
ObjectReference Property BMI_DaeGSDisplay Auto
ObjectReference Property BMI_DraGSDisplay Auto
ObjectReference Property BMI_DwaGSDisplay Auto
ObjectReference Property BMI_EboGSDisplay Auto
ObjectReference Property BMI_ElvGSDisplay Auto
ObjectReference Property BMI_GlaGSDisplay Auto
ObjectReference Property BMI_IroGSDisplay Auto
ObjectReference Property BMI_OrcGSDisplay Auto
ObjectReference Property BMI_SteGSDisplay Auto
ObjectReference Property BMI_StaGSDisplay Auto
 
;Mace ObjectReference Properties
 
ObjectReference Property BMI_DaeMADisplay Auto
ObjectReference Property BMI_DraMADisplay Auto
ObjectReference Property BMI_DwaMADisplay Auto
ObjectReference Property BMI_EboMADisplay Auto
ObjectReference Property BMI_ElvMADisplay Auto
ObjectReference Property BMI_GlaMADisplay Auto
ObjectReference Property BMI_IroMADisplay Auto
ObjectReference Property BMI_OrcMADisplay Auto
ObjectReference Property BMI_SteMADisplay Auto
ObjectReference Property BMI_StaMADisplay Auto
 
;Sword ObjectReference Properties
 
ObjectReference Property BMI_DaeSWDisplay Auto
ObjectReference Property BMI_DraSWDisplay Auto
ObjectReference Property BMI_DwaSWDisplay Auto
ObjectReference Property BMI_EboSWDisplay Auto
ObjectReference Property BMI_ElvSWDisplay Auto
ObjectReference Property BMI_GlaSWDisplay Auto
ObjectReference Property BMI_IroSWDisplay Auto
ObjectReference Property BMI_OrcSWDisplay Auto
ObjectReference Property BMI_SteSWDisplay Auto
ObjectReference Property BMI_StaSWDisplay Auto
 
;WarAxe ObjectReference Properties
 
ObjectReference Property BMI_DaeWADisplay Auto
ObjectReference Property BMI_DraWADisplay Auto
ObjectReference Property BMI_DwaWADisplay Auto
ObjectReference Property BMI_EboWADisplay Auto
ObjectReference Property BMI_ElvWADisplay Auto
ObjectReference Property BMI_GlaWADisplay Auto
ObjectReference Property BMI_IroWADisplay Auto
ObjectReference Property BMI_OrcWADisplay Auto
ObjectReference Property BMI_SteWADisplay Auto
ObjectReference Property BMI_StaWADisplay Auto
 
;WarHammer ObjectReference Properties
ObjectReference Property BMI_DaeWHDisplay Auto
ObjectReference Property BMI_DraWHDisplay Auto
ObjectReference Property BMI_DwaWHDisplay Auto
ObjectReference Property BMI_EboWHDisplay Auto
ObjectReference Property BMI_ElvWHDisplay Auto
ObjectReference Property BMI_GlaWHDisplay Auto
ObjectReference Property BMI_IroWHDisplay Auto
ObjectReference Property BMI_OrcWHDisplay Auto
ObjectReference Property BMI_SteWHDisplay Auto
ObjectReference Property BMI_StaWHDisplay Auto
 
;Keyword Properties Material Types
 
Keyword Property WeapMaterialDaedric Auto
Keyword Property DLC1WeapMaterialDragonbone Auto
Keyword Property WeapMaterialDwarven Auto
Keyword Property WeapMaterialEbony Auto
Keyword Property WeapMaterialElven Auto
Keyword Property WeapMaterialGlass Auto
Keyword Property WeapMaterialIron Auto
Keyword Property WeapMaterialOrcish Auto
Keyword Property WeapMaterialSteel Auto
Keyword Property DLC2WeaponMaterialStalhrim Auto
 
;Keyword Properties Weapon Types
 
Keyword Property WeapTypeBattleaxe Auto
Keyword Property WeapTypeBow Auto
Keyword Property WeapTypeDagger Auto
Keyword Property WeapTypeGreatsword Auto
Keyword Property WeapTypeMace Auto
Keyword Property WeapTypeSword Auto
Keyword Property WeapTypeWarAxe Auto
Keyword Property WeapTypeWarhammer Auto
 
 
Keyword Property VendorItemWeapon Auto
 
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
If akBaseItem.HasKeyword(VendorItemWeapon)
DaeBatEnaDis()
DraBatEnaDis()
DwaBatEnaDis()
EboBatEnaDis()
ElvBatEnaDis()
GlaBatEnaDis()
IroBatEnaDis()
OrcBatEnaDis()
StaBatEnaDis()
SteBatEnaDis()
EndIf
EndEvent
 
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
If akBaseItem.HasKeyword(VendorItemWeapon)
DaeBatEnaDis()
DraBatEnaDis()
DwaBatEnaDis()
EboBatEnaDis()
ElvBatEnaDis()
GlaBatEnaDis()
IroBatEnaDis()
OrcBatEnaDis()
StaBatEnaDis()
SteBatEnaDis()
EndIf
EndEvent
 
Function DaeBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialDaedric) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_DaeBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialDaedric) < 1)
BMI_DaeBatDisplay.Disable()
ElseIf (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_DaeBatDisplay.Disable()
EndIf
EndFunction
 
Function DraBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(DLC1WeapMaterialDragonbone) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_DraBatDisplay.Enable()
ElseIf (Self.GetItemCount(DLC1WeapMaterialDragonbone) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_DraBatDisplay.Disable()
EndIf
EndFunction
 
Function DwaBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialDwarven) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_DwaBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialDwarven) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_DwaBatDisplay.Disable()
EndIf
EndFunction
 
Function EboBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialEbony) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_EboBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialEbony) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_EboBatDisplay.Disable()
EndIf
EndFunction
 
Function ElvBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialElven) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_ElvBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialElven) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_ElvBatDisplay.Disable()
EndIf
EndFunction
 
Function GlaBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialGlass) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_GlaBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialGlass) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_GlaBatDisplay.Disable()
EndIf
EndFunction
 
Function IroBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialIron) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_IroBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialIron) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_IroBatDisplay.Disable()
EndIf
EndFunction
 
Function OrcBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialOrcish) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_OrcBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialOrcish) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_OrcBatDisplay.Disable()
EndIf
EndFunction
 
Function SteBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(WeapMaterialSteel) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_SteBatDisplay.Enable()
ElseIf (Self.GetItemCount(WeapMaterialSteel) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_SteBatDisplay.Disable()
EndIf
EndFunction
 
Function StaBatEnaDis() ;Checks to make sure the weapon display being Enabled or Disabled has a matching type and material item inside the container
If (Self.GetItemCount(DLC2WeaponMaterialStalhrim) >= 1) && (Self.GetItemCount(WeapTypeBattleaxe) >= 1)
BMI_StaBatDisplay.Enable()
ElseIf (Self.GetItemCount(DLC2WeaponMaterialStalhrim) < 1) && (Self.GetItemCount(WeapTypeBattleaxe) < 1)
BMI_StaBatDisplay.Disable()
EndIf
EndFunction

 

 

 

The alteration to DaeBatEnaDis() was my intial thought at fixing the issue with needing to remove all daedric or all battleaxe items from the chest to make them disable. this meathod would work ok if i only used one type of weapon or material per chest i think but surely there is a way to get around the problem and im just to bad at this to see it xD **sorry didnt clean up the indents for easier reading but it at least has spacing between stuff

 

the way the other Functions are setup, you have to have both no battleaxe and no x material type before it disables. So if you have a battle axe of any type left in the chest it doesnt disable. Didnt bother adding other weapon types while testing but logic would dictate that the same would hold true about the material types.

 

Since the enable seems to work fine, perhaps i could do 80 int properties and set it to add 1 anytime the first line is true then for disable anytime self.haskeyword(daedricmaterial) && self.haskeyword(battleaxe) is removed subract one and disable display when the int is < 1 ?

Edited by aoh125
Link to comment
Share on other sites

If these were unique items, I would say to have a single formlist for the items and a second index matching formlist of the displays. Thus when an item is added to the container, check if it is on the item list, find its index and then enable the display from the display formlist using that index value.

 

Since you are wanting to work with keywords for both material and weapon type, it will need to be done differently.

 

As to why your second script is not working at all: You are using Self.HasKeyword on a script attached to a container. This will automatically fail as containers do not have those keywords. In the first script that worked those were being used with the akBaseItem parameter of the OnItemAdded and OnItemRemoved events. You can fix this by adding a parameter to your custom functions. Example:

 

Function WeapTypeCheck(Form TheItem) ;Checks Keywords for Type of Weapon then Sends it to Check Material Type
 If TheItem.HasKeyword(WeapTypeBattleaxe)
  WeapMatCheckBat(TheItem)
 ElseIf TheItem.HasKeyword(WeapTypeBow)
 
 ElseIf TheItem.HasKeyword(WeapTypeDagger)
 
 ElseIf TheItem.HasKeyword(WeapTypeGreatsword)
 
 ElseIf TheItem.HasKeyword(WeapTypeMace)
 
 ElseIf TheItem.HasKeyword(WeapTypeSword)
 
 ElseIf TheItem.HasKeyword(WeapTypeWarAxe)
 
 ElseIf TheItem.HasKeyword(WeapTypeWarhammer)
 
 EndIf
EndFunction

 

 

 

At any rate, I would approach this differently. I will try to explain and then I will post a modification of the script demonstrating those changes.

Create a form list of the material keywords.

Create a form list of the weapon type keywords.

Create form lists of your displays based on weapon type. i.e. all bow displays in one list, all 2h axes in one list etc.

The internal ordering of these display lists need to match the material keyword list created earlier. i.e. each index in all lists are for the same material

FYI - drag and drop from Cell view window into form list box when display area is loaded in Render window

Create a form list containing the previously created display lists.

The internal ordering of this list needs to match the weapon type list created earlier. i.e. index 0 in both lists point to the battle axe type

Using these lists, the item being added / removed can be checked against the weapon type and material lists, the index values for that item are retrieved and because the lists were designed to match the display item can be retrieved. First by getting the form list from the "master list" that corresponds to weapon type and then getting the entry that corresponds to that weapon type's material.

 

 

;Bow ObjectReference Properties
;FormList Property BMI_BowDisplays Auto <-- not actual property on script but a real formlist that needs created
  ;ObjectReference Property BMI_DaeBWDisplay Auto  <-- moved to index 0
  ;ObjectReference Property BMI_DraBWDisplay Auto  <-- moved to index 1
  ;ObjectReference Property BMI_DwaBWDisplay Auto  <-- moved to index 2
  ;ObjectReference Property BMI_EboBWDisplay Auto  <-- moved to index 3
  ;ObjectReference Property BMI_ElvBWDisplay Auto  <-- moved to index 4
  ;ObjectReference Property BMI_GlaBWDisplay Auto  <-- moved to index 5
  ;ObjectReference Property BMI_IroBWDisplay Auto  <-- moved to index 6
  ;ObjectReference Property BMI_OrcBWDisplay Auto  <-- moved to index 7
  ;ObjectReference Property BMI_SteBWDisplay Auto  <-- moved to index 8
  ;ObjectReference Property BMI_StaBWDisplay Auto  <-- moved to index 9

;other sections snipped for brevity as example should no longer be needed 

;BattleAxe ObjectReference Properties
;FormList Property BMI_Axe2hDisplays Auto  <-- not actual property on script but a real formlist that needs created

;Dagger ObjectReference Properties
;FormList Property BMI_DaggerDisplays Auto  <-- not actual property on script but a real formlist that needs created
 
;GreatSword ObjectReference Properties
;FormList Property BMI_Sword2hDisplays Auto <-- not actual property on script but a real formlist that needs created
 
;Mace ObjectReference Properties
;FormList Property BMI_MaceDisplays Auto <-- not actual property on script but a real formlist that needs created
 
;Sword ObjectReference Properties
;FormList Property BMI_Sword1hDisplays Auto <-- not actual property on script but a real formlist that needs created
 
;WarAxe ObjectReference Properties
;FormList Property BMI_Axe1hDisplays Auto <-- not actual property on script but a real formlist that needs created
 
;WarHammer ObjectReference Properties
;FormList Property BMI_HammerDisplays Auto <-- not actual property on script but a real formlist that needs created

;master display formlist
FormList Property BMI_MasterDisplayList Auto
  ;contains the following:
    ;FormList Property BMI_Axe2hDisplays Auto  <-- at index 0
    ;FormList Property BMI_BowDisplays Auto  <-- at index 1
    ;FormList Property BMI_DaggerDisplays Auto  <-- at index 2
    ;FormList Property BMI_Sword2hDisplays Auto  <-- at index 3
    ;FormList Property BMI_MaceDisplays Auto  <-- at index 4
    ;FormList Property BMI_Sword1hDisplays Auto   <-- at index 5
    ;FormList Property BMI_Axe1hDisplays Auto  <-- at index 6
    ;FormList Property BMI_HammerDisplays Auto  <-- at index 7

;Keyword Properties Material Types
FormList Property BMI_WeaponMaterialsList Auto
  ;Keyword Property WeapMaterialDaedric Auto  <-- moved to index 0
  ;Keyword Property DLC1WeapMaterialDragonbone Auto  <-- moved to index 1
  ;Keyword Property WeapMaterialDwarven Auto  <-- moved to index 2
  ;Keyword Property WeapMaterialEbony Auto  <-- moved to index 3
  ;Keyword Property WeapMaterialElven Auto  <-- moved to index 4
  ;Keyword Property WeapMaterialGlass Auto  <-- moved to index 5
  ;Keyword Property WeapMaterialIron Auto  <-- moved to index 6
  ;Keyword Property WeapMaterialOrcish Auto  <-- moved to index 7
  ;Keyword Property WeapMaterialSteel Auto  <-- moved to index 8
  ;Keyword Property DLC2WeaponMaterialStalhrim Auto  <-- moved to index 9
 
;Keyword Properties Weapon Types
FormList Property BMI_WeaponTypesList Auto
  ;Keyword Property WeapTypeBattleaxe Auto  <-- moved to index 0 
  ;Keyword Property WeapTypeBow Auto  <-- moved to index 1
  ;Keyword Property WeapTypeDagger Auto  <-- moved to index 2
  ;Keyword Property WeapTypeGreatsword Auto  <-- moved to index 3
  ;Keyword Property WeapTypeMace Auto  <-- moved to index 4
  ;Keyword Property WeapTypeSword Auto  <-- moved to index 5
  ;Keyword Property WeapTypeWarAxe Auto  <-- moved to index 6
  ;Keyword Property WeapTypeWarhammer Auto  <-- moved to index 7
 
Keyword Property VendorItemWeapon Auto
 
Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)
  If akBaseItem.HasKeyword(VendorItemWeapon)
    Int TypeIndex = GetIndexValueFromKeywordList(akBaseItem,BMI_WeaponTypesList)
    Int MatIndex = GetIndexValueFromKeywordList(akBaseItem,BMI_WeaponMaterialsList)
    If TypeIndex != -1 && MatIndex != -1 ; both lists returned a valid entry
      FormList MaterialDisplayList = BMI_MasterDisplayList.GetAt(TypeIndex) as FormList
      ObjectReference myDisplay = MaterialDisplayList.GetAt(MatIndex) as ObjectReference
      If myDisplay.IsDisabled()
        myDisplay.Enable()
      EndIf
    EndIf
  EndIf
EndEvent
 
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
  If (Self.GetItemCount(akBaseItem) == 0) ; only try to disable the display if no more of the object are present in the container
    If akBaseItem.HasKeyword(VendorItemWeapon)
      Int TypeIndex = GetIndexValueFromKeywordList(akBaseItem,BMI_WeaponTypesList)
      Int MatIndex = GetIndexValueFromKeywordList(akBaseItem,BMI_WeaponMaterialsList)
      If TypeIndex != -1 && MatIndex != -1 ; both lists returned a valid entry
        FormList MaterialDisplayList = BMI_MasterDisplayList.GetAt(TypeIndex) as FormList
        ObjectReference myDisplay = MaterialDisplayList.GetAt(MatIndex) as ObjectReference
        If myDisplay.IsEnabled()
          myDisplay.Disable()
        EndIf
      EndIf
    EndIf
  EndIf
EndEvent
 
Int Function GetIndexValueFromKeywordList(Form TheItem,FormList TheList) 
; Checks the passed in item agains the passed in keyword formlist and returns the index of the first match found
; returns -1 if no match found

  Int myF_value = -1
  Int index = TheList.GetSize()
  While index > 0
    index -= 1
    Keyword myKW = TheList.GetAt(index) as Keyword
    If TheItem.HasKeyword(myKW)
      myF_value = index
      index = -1 ; found match - exit loop
    EndIf
  EndWhile
  Return myF_value
EndFunction

 

 

 

EDIT: Sure were quite a few posts while I was working out the logic for this... Hope this proves to be helpful nonetheless.

EDIT 2: Small tweak to the code - forgot to cast the form list entry when assigning it to a variable.

EDIT 3: Another small tweak to the code - why is it that I do not see these things till after it is posted????

EDIT 4: Fixed a couple of things discovered as aoh125 tried to utilize this

Edited by IsharaMeradin
Link to comment
Share on other sites

This is one simple version of a wall weapon. It can be set up for any weapon. Don't use a chest however.
Custom Activator Base for the name to be shown on a custom Sphere Activator. The def button script is on the base.
It got kinda clipped out there. The other script (below) is not on the base.



Scriptname _RGD_EnableWallWeapon extends ObjectReference
;* WallWeapon Enable/Disable * By: NexusComa * ; nexusmods.com
ObjectReference Property Marker Auto
Weapon Property WallWeapon Auto
;
Event OnInit()
If(Marker.IsDisabled())
GoToState("Disabled")
Else
GoToState("Enabled")
EndIf
EndEvent
;-----------------------
State Disabled
Event OnActivate(ObjectReference akActionRef)
If(Game.GetPlayer().GetItemCount(WallWeapon) > 0)
Game.GetPlayer().RemoveItem(WallWeapon)
Marker.Enable()
GoToState("Enabled")
EndIf
EndEvent
EndState
;-----------------------
State Enabled
Event OnActivate(ObjectReference akActionRef)
Game.GetPlayer().AddItem(WallWeapon)
Marker.Disable()
GoToState("Disabled")
EndEvent
EndState
;



Wall-Weapon.png

Edited by NexusComa
Link to comment
Share on other sites

Yea im terrible about updating posts after the fact. i normally choose to do that instead of posting again lol. I think i get the concept of what youre talking about with the index's and that seems preferable over making 80 int values which may or may not even work. Thanks for taking the time to outline that so specifically and make it easier for me to understand. The example code seems a little less familiar and straight forward but with it im sure ill manage to figure out how to make this work right. Can i ask one more thing about your example and explanation here though. I have seen != used in a few examples recently and have no idea what it means.

Link to comment
Share on other sites

Thanks coma. Yea i used something very different but still similar to test my displays as i made them. I used an activator and a menu to disable and enable all of a weapon type. (was thinking maybe making it an option to say purchase all greatswords for 10-20k then be toggleable but idk after all this headache to try n get the chest working) anyway ill dig out the code for that toggle real quick just to show the way i went about it.

 

 

 

;BattleAxe ObjectReference Properties
 
ObjectReference Property BMI_DaeBatDisplay Auto
ObjectReference Property BMI_DraBatDisplay Auto
ObjectReference Property BMI_DwaBatDisplay Auto
ObjectReference Property BMI_EboBatDisplay Auto
ObjectReference Property BMI_ElvBatDisplay Auto
ObjectReference Property BMI_GlaBatDisplay Auto
ObjectReference Property BMI_IroBatDisplay Auto
ObjectReference Property BMI_OrcBatDisplay Auto
ObjectReference Property BMI_SteBatDisplay Auto
ObjectReference Property BMI_StaBatDisplay Auto
 
;GreatSword ObjectReference Properties
ObjectReference Property BMI_DaeGSDisplay Auto
ObjectReference Property BMI_DraGSDisplay Auto
ObjectReference Property BMI_DwaGSDisplay Auto
ObjectReference Property BMI_EboGSDisplay Auto
ObjectReference Property BMI_ElvGSDisplay Auto
ObjectReference Property BMI_GlaGSDisplay Auto
ObjectReference Property BMI_IroGSDisplay Auto
ObjectReference Property BMI_OrcGSDisplay Auto
ObjectReference Property BMI_SteGSDisplay Auto
ObjectReference Property BMI_StaGSDisplay Auto
 
;WarHammer ObjectReference Properties
ObjectReference Property BMI_DaeWHDisplay Auto
ObjectReference Property BMI_DraWHDisplay Auto
ObjectReference Property BMI_DwaWHDisplay Auto
ObjectReference Property BMI_EboWHDisplay Auto
ObjectReference Property BMI_ElvWHDisplay Auto
ObjectReference Property BMI_GlaWHDisplay Auto
ObjectReference Property BMI_IroWHDisplay Auto
ObjectReference Property BMI_OrcWHDisplay Auto
ObjectReference Property BMI_SteWHDisplay Auto
ObjectReference Property BMI_StaWHDisplay Auto
 
;Mace ObjectReference Properties
 
ObjectReference Property BMI_DaeMADisplay Auto
ObjectReference Property BMI_DraMADisplay Auto
ObjectReference Property BMI_DwaMADisplay Auto
ObjectReference Property BMI_EboMADisplay Auto
ObjectReference Property BMI_ElvMADisplay Auto
ObjectReference Property BMI_GlaMADisplay Auto
ObjectReference Property BMI_IroMADisplay Auto
ObjectReference Property BMI_OrcMADisplay Auto
ObjectReference Property BMI_SteMADisplay Auto
ObjectReference Property BMI_StaMADisplay Auto
 
;WarAxe ObjectReference Properties
 
ObjectReference Property BMI_DaeWADisplay Auto
ObjectReference Property BMI_DraWADisplay Auto
ObjectReference Property BMI_DwaWADisplay Auto
ObjectReference Property BMI_EboWADisplay Auto
ObjectReference Property BMI_ElvWADisplay Auto
ObjectReference Property BMI_GlaWADisplay Auto
ObjectReference Property BMI_IroWADisplay Auto
ObjectReference Property BMI_OrcWADisplay Auto
ObjectReference Property BMI_SteWADisplay Auto
ObjectReference Property BMI_StaWADisplay Auto
 
 
;Bow ObjectReference Properties
 
ObjectReference Property BMI_DaeBWDisplay Auto
ObjectReference Property BMI_DraBWDisplay Auto
ObjectReference Property BMI_DwaBWDisplay Auto
ObjectReference Property BMI_EboBWDisplay Auto
ObjectReference Property BMI_ElvBWDisplay Auto
ObjectReference Property BMI_GlaBWDisplay Auto
ObjectReference Property BMI_IroBWDisplay Auto
ObjectReference Property BMI_OrcBWDisplay Auto
ObjectReference Property BMI_SteBWDisplay Auto
ObjectReference Property BMI_StaBWDisplay Auto
 
;Dagger ObjectReference Properties
 
ObjectReference Property BMI_DaeDADisplay Auto
ObjectReference Property BMI_DraDADisplay Auto
ObjectReference Property BMI_DwaDADisplay Auto
ObjectReference Property BMI_EboDADisplay Auto
ObjectReference Property BMI_ElvDADisplay Auto
ObjectReference Property BMI_GlaDADisplay Auto
ObjectReference Property BMI_IroDADisplay Auto
ObjectReference Property BMI_OrcDADisplay Auto
ObjectReference Property BMI_SteDADisplay Auto
ObjectReference Property BMI_StaDADisplay Auto
 
;Sword ObjectReference Properties
 
ObjectReference Property BMI_DaeSWDisplay Auto
ObjectReference Property BMI_DraSWDisplay Auto
ObjectReference Property BMI_DwaSWDisplay Auto
ObjectReference Property BMI_EboSWDisplay Auto
ObjectReference Property BMI_ElvSWDisplay Auto
ObjectReference Property BMI_GlaSWDisplay Auto
ObjectReference Property BMI_IroSWDisplay Auto
ObjectReference Property BMI_OrcSWDisplay Auto
ObjectReference Property BMI_SteSWDisplay Auto
ObjectReference Property BMI_StaSWDisplay Auto
 
Message Property BMI_MB_Display_MainMenu Auto
 
Int Property BatState = 0 Auto
Int Property GSState = 0 Auto
Int Property WHState = 0 Auto
Int Property WAState = 0 Auto
Int Property MAState = 0 Auto
Int Property BWState = 0 Auto
Int Property SWState = 0 Auto
Int Property DAState = 0 Auto
 
Event OnActivate(ObjectReference akActionRef)
Menu()
EndEvent
 
 
 
Function Menu(int Choice = 0)
Choice = BMI_MB_Display_MainMenu.show()
If Choice == 0
 
ElseIf Choice == 1
If BatState == 0
EnaBat()
Game.FadeOutGame(false, true, 0.5, 0.5)
BatState = 1
ElseIf BatState == 1
DisBat()
Game.FadeOutGame(false, true, 0.5, 0.5)
BatState = 0
EndIf
ElseIf Choice == 2
If GSState == 0
EnaGS()
Game.FadeOutGame(false, true, 0.5, 0.5)
GSState = 1
ElseIf GSState == 1
DisGS()
Game.FadeOutGame(false, true, 0.5, 0.5)
GSState = 0
EndIf
ElseIf Choice == 3
If WHState == 0
EnaWH()
Game.FadeOutGame(false, true, 0.5, 0.5)
WHState = 1
ElseIf GSState == 1
DisWH()
Game.FadeOutGame(false, true, 0.5, 0.5)
WHState = 0
EndIf
ElseIf Choice == 4
If WAState == 0
EnaWA()
Game.FadeOutGame(false, true, 0.5, 0.5)
WAState = 1
ElseIf WAState == 1
DisWA()
Game.FadeOutGame(false, true, 0.5, 0.5)
WAState = 0
EndIf
ElseIf Choice == 5
If MAState == 0
EnaMA()
Game.FadeOutGame(false, true, 0.5, 0.5)
MAState = 1
ElseIf MAState == 1
DisMA()
Game.FadeOutGame(false, true, 0.5, 0.5)
MAState = 0
EndIf
ElseIf Choice == 6
If BWState == 0
EnaBW()
Game.FadeOutGame(false, true, 0.5, 0.5)
BWState = 1
ElseIf BWState == 1
DisBW()
Game.FadeOutGame(false, true, 0.5, 0.5)
BWState = 0
EndIf
ElseIf Choice == 7
If SWState == 0
EnaSW()
Game.FadeOutGame(false, true, 0.5, 0.5)
SWState = 1
ElseIf SWState == 1
DisSW()
Game.FadeOutGame(false, true, 0.5, 0.5)
SWState = 0
EndIf
ElseIf Choice == 8
If DAState == 0
EnaDA()
Game.FadeOutGame(false, true, 0.5, 0.5)
DAState = 1
ElseIf DAState == 1
DisDA()
Game.FadeOutGame(false, true, 0.5, 0.5)
DAState = 0
EndIf
EndIf
EndFunction
 
;Disable all WarHammer Display Function
Function DisWH()
BMI_DaeWHDisplay.Disable()
BMI_DraWHDisplay.Disable()
BMI_DwaWHDisplay.Disable()
BMI_EboWHDisplay.Disable()
BMI_ElvWHDisplay.Disable()
BMI_GlaWHDisplay.Disable()
BMI_IroWHDisplay.Disable()
BMI_OrcWHDisplay.Disable()
BMI_SteWHDisplay.Disable()
BMI_StaWHDisplay.Disable()
EndFunction
 
;Enable all WarHammer Display Function
Function EnaWH()
BMI_DaeWHDisplay.Enable()
BMI_DraWHDisplay.Enable()
BMI_DwaWHDisplay.Enable()
BMI_EboWHDisplay.Enable()
BMI_ElvWHDisplay.Enable()
BMI_GlaWHDisplay.Enable()
BMI_IroWHDisplay.Enable()
BMI_OrcWHDisplay.Enable()
BMI_SteWHDisplay.Enable()
BMI_StaWHDisplay.Enable()
EndFunction
 
;Disable all BattleAxe Display Function
Function DisBat()
BMI_DaeBatDisplay.Disable()
BMI_DraBatDisplay.Disable()
BMI_DwaBatDisplay.Disable()
BMI_EboBatDisplay.Disable()
BMI_ElvBatDisplay.Disable()
BMI_GlaBatDisplay.Disable()
BMI_IroBatDisplay.Disable()
BMI_OrcBatDisplay.Disable()
BMI_SteBatDisplay.Disable()
BMI_StaBatDisplay.Disable()
EndFunction
 
;Enable all BattleAxe Display Function
Function EnaBat()
BMI_DaeBatDisplay.Enable()
BMI_DraBatDisplay.Enable()
BMI_DwaBatDisplay.Enable()
BMI_EboBatDisplay.Enable()
BMI_ElvBatDisplay.Enable()
BMI_GlaBatDisplay.Enable()
BMI_IroBatDisplay.Enable()
BMI_OrcBatDisplay.Enable()
BMI_SteBatDisplay.Enable()
BMI_StaBatDisplay.Enable()
EndFunction
 
;Disable all GreatSword Display Function
Function DisGS()
BMI_DaeGSDisplay.Disable()
BMI_DraGSDisplay.Disable()
BMI_DwaGSDisplay.Disable()
BMI_EboGSDisplay.Disable()
BMI_ElvGSDisplay.Disable()
BMI_GlaGSDisplay.Disable()
BMI_IroGSDisplay.Disable()
BMI_OrcGSDisplay.Disable()
BMI_SteGSDisplay.Disable()
BMI_StaGSDisplay.Disable()
EndFunction
 
;Enable all GreatSword Display Function
Function EnaGS()
BMI_DaeGSDisplay.Enable()
BMI_DraGSDisplay.Enable()
BMI_DwaGSDisplay.Enable()
BMI_EboGSDisplay.Enable()
BMI_ElvGSDisplay.Enable()
BMI_GlaGSDisplay.Enable()
BMI_IroGSDisplay.Enable()
BMI_OrcGSDisplay.Enable()
BMI_SteGSDisplay.Enable()
BMI_StaGSDisplay.Enable()
EndFunction
 
;Disable all Mace Display Function
Function DisMA()
BMI_DaeMADisplay.Disable()
BMI_DraMADisplay.Disable()
BMI_DwaMADisplay.Disable()
BMI_EboMADisplay.Disable()
BMI_ElvMADisplay.Disable()
BMI_GlaMADisplay.Disable()
BMI_IroMADisplay.Disable()
BMI_OrcMADisplay.Disable()
BMI_SteMADisplay.Disable()
BMI_StaMADisplay.Disable()
EndFunction
 
;Enable all Mace Display Function
Function EnaMA()
BMI_DaeMADisplay.Enable()
BMI_DraMADisplay.Enable()
BMI_DwaMADisplay.Enable()
BMI_EboMADisplay.Enable()
BMI_ElvMADisplay.Enable()
BMI_GlaMADisplay.Enable()
BMI_IroMADisplay.Enable()
BMI_OrcMADisplay.Enable()
BMI_SteMADisplay.Enable()
BMI_StaMADisplay.Enable()
EndFunction
 
;Disable all WarAxe Display Function
Function DisWA()
BMI_DaeWADisplay.Disable()
BMI_DraWADisplay.Disable()
BMI_DwaWADisplay.Disable()
BMI_EboWADisplay.Disable()
BMI_ElvWADisplay.Disable()
BMI_GlaWADisplay.Disable()
BMI_IroWADisplay.Disable()
BMI_OrcWADisplay.Disable()
BMI_SteWADisplay.Disable()
BMI_StaWADisplay.Disable()
EndFunction
 
;Enable all WarAxe Display Function
Function EnaWA()
BMI_DaeWADisplay.Enable()
BMI_DraWADisplay.Enable()
BMI_DwaWADisplay.Enable()
BMI_EboWADisplay.Enable()
BMI_ElvWADisplay.Enable()
BMI_GlaWADisplay.Enable()
BMI_IroWADisplay.Enable()
BMI_OrcWADisplay.Enable()
BMI_SteWADisplay.Enable()
BMI_StaWADisplay.Enable()
EndFunction
 
;Disable all Sword Display Function
Function DisSW()
BMI_DaeSWDisplay.Disable()
BMI_DraSWDisplay.Disable()
BMI_DwaSWDisplay.Disable()
BMI_EboSWDisplay.Disable()
BMI_ElvSWDisplay.Disable()
BMI_GlaSWDisplay.Disable()
BMI_IroSWDisplay.Disable()
BMI_OrcSWDisplay.Disable()
BMI_SteSWDisplay.Disable()
BMI_StaSWDisplay.Disable()
EndFunction
 
;Enable all Sword Display Function
Function EnaSW()
BMI_DaeSWDisplay.Enable()
BMI_DraSWDisplay.Enable()
BMI_DwaSWDisplay.Enable()
BMI_EboSWDisplay.Enable()
BMI_ElvSWDisplay.Enable()
BMI_GlaSWDisplay.Enable()
BMI_IroSWDisplay.Enable()
BMI_OrcSWDisplay.Enable()
BMI_SteSWDisplay.Enable()
BMI_StaSWDisplay.Enable()
EndFunction
 
;Disable all Daggers Display Function
Function DisDA()
BMI_DaeDADisplay.Disable()
BMI_DraDADisplay.Disable()
BMI_DwaDADisplay.Disable()
BMI_EboDADisplay.Disable()
BMI_ElvDADisplay.Disable()
BMI_GlaDADisplay.Disable()
BMI_IroDADisplay.Disable()
BMI_OrcDADisplay.Disable()
BMI_SteDADisplay.Disable()
BMI_StaDADisplay.Disable()
EndFunction
 
;Enable all Daggers Display Function
Function EnaDA()
BMI_DaeDADisplay.Enable()
BMI_DraDADisplay.Enable()
BMI_DwaDADisplay.Enable()
BMI_EboDADisplay.Enable()
BMI_ElvDADisplay.Enable()
BMI_GlaDADisplay.Enable()
BMI_IroDADisplay.Enable()
BMI_OrcDADisplay.Enable()
BMI_SteDADisplay.Enable()
BMI_StaDADisplay.Enable()
EndFunction
 
;Disable all Bow Display Function
Function DisBW()
BMI_DaeBWDisplay.Disable()
BMI_DraBWDisplay.Disable()
BMI_DwaBWDisplay.Disable()
BMI_EboBWDisplay.Disable()
BMI_ElvBWDisplay.Disable()
BMI_GlaBWDisplay.Disable()
BMI_IroBWDisplay.Disable()
BMI_OrcBWDisplay.Disable()
BMI_SteBWDisplay.Disable()
BMI_StaBWDisplay.Disable()
EndFunction
 
;Enable all Bow Display Function
Function EnaBW()
BMI_DaeBWDisplay.Enable()
BMI_DraBWDisplay.Enable()
BMI_DwaBWDisplay.Enable()
BMI_EboBWDisplay.Enable()
BMI_ElvBWDisplay.Enable()
BMI_GlaBWDisplay.Enable()
BMI_IroBWDisplay.Enable()
BMI_OrcBWDisplay.Enable()
BMI_SteBWDisplay.Enable()
BMI_StaBWDisplay.Enable()
EndFunction

 

 

 

 

ahhhhh. i should have known that. thanks NexusComa. it was really bugging me while looking at a formlist thing earlier "getsize" i think it was called. seemed like i might have been useful for my problem but wasnt confident i understood what it did or how to implement it so i left it alone.

 

Speaking of getsize just realized its part of IsharaMeradin's exmaple script. (hadnt looked it over carefully since i was still reading and rereading the instructions and trying to wrap my head around this new concept lol.)

Edited by aoh125
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...