Transfer properties from one script(MCM) to another

Post » Sun Nov 10, 2013 7:37 pm

Apparently values aren't transfered to the other script.

Inside MCM:

Bool Property firekill Auto

(...)

elseIf (option == fireOID)
firekill = !firekill
SetToggleOptionValue(fireOID, firekill)

(...)

In the script to receive the bool:

trulyundead property anythinggoes auto

if (anythinggoes.firekill == true) , always comes as false even if using default values as true

(...)

endif

For some odd reason it was working before, but unfortunately I lost the data(previous script).

The parenthesis in the if clause makes no difference in the error.

User avatar
Channing
 
Posts: 3393
Joined: Thu Nov 30, 2006 4:05 pm

Post » Sun Nov 10, 2013 5:37 pm

Post the full scripts. Also make sure your properties are filled properly.

User avatar
Kyra
 
Posts: 3365
Joined: Mon Jan 29, 2007 8:24 am

Post » Sun Nov 10, 2013 9:16 pm

MCM menu:

Spoiler
Scriptname trulyundead extends SKI_ConfigBase

int raiseOID_S
int vraiseOID_S
int draiseOID_S
Float Property vraisech Auto
Float Property raisech Auto
Float Property draisech Auto
Bool Property firekill Auto
Bool Property dfirekill Auto
Bool Property vfirekill Auto
Bool Property deskill Auto
Bool Property vdeskill Auto
Bool Property ddeskill Auto
Bool Property daedrakill Auto
Bool Property vdaedrakill Auto
Bool Property ddaedrakill Auto
Bool Property sunkill Auto
Bool Property vsunkill Auto
Bool Property dsunkill Auto
Bool Property restkill Auto
Bool Property vrestkill Auto
Bool Property drestkill Auto
Bool Property silkill Auto
Bool Property vsilkill Auto
Bool Property dsilkill Auto

int fireOID
int sunOID
int restOID
int desOID
int daedraOID
int silOID


int vfireOID
int vsunOID
int vrestOID
int vdesOID
int vdaedraOID
int vsilOID


int dfireOID
int dsunOID
int drestOID
int ddesOID
int ddaedraOID
int dsilOID

event OnConfigInit()
Pages = new string[2]
Pages[0] = "Skeletons"
Pages[1] = "Vampires"

endEvent


event OnPageReset(string a_page)
if (a_page == "Skeletons")

sunOID = AddToggleOption("Sun", sunkill)
desOID = AddToggleOption("Destruction", deskill)
restOID = AddToggleOption("Restoration", restkill)
daedraOID = AddToggleOption("Daedra", daedrakill)
fireOID = AddToggleOption("Fire", firekill)
silOID = AddToggleOption("Silver", silkill)


elseif(a_page == "Vampires")

vsunOID = AddToggleOption("Sun", vsunkill)
vdesOID = AddToggleOption("Destruction", vdeskill)
vrestOID = AddToggleOption("Restoration", vrestkill)
vdaedraOID = AddToggleOption("Daedra", vdaedrakill)
vfireOID = AddToggleOption("Fire", vfirekill)
vsilOID = AddToggleOption("Silver", vsilkill)



endif
endevent



event OnOptionHighlight(int a_option)

if (a_option == silOID)
SetInfoText("Skeletons will be killed by silver and dawnguard weapons.")
elseif (a_option == sunOID)
SetInfoText("Skeletons will be killed by sun damage.")
elseif (a_option == fireOID)
SetInfoText("Skeletons will be killed by fire damage.")
elseif (a_option == daedraOID)
SetInfoText("Skeletons will be killed by Werewolfs, Vampires and the Dawnbreaker")
elseif (a_option == restOID)
SetInfoText("Skeletons will be killed by restoration magic.")
elseif (a_option == desOID)
SetInfoText("Skeletons will be killed by destruction magic.")
elseif (a_option == vsilOID)
SetInfoText("Vampires will be killed by silver and dawnguard weapons.")
elseif (a_option == vsunOID)
SetInfoText("Vampires will be killed by sun damage.")
elseif (a_option == vfireOID)
SetInfoText("Vampires will be killed by fire damage.")
elseif (a_option == vdaedraOID)
SetInfoText("Vampires will be killed by Werewolfs, Vampires and the Dawnbreaker")
elseif (a_option == vrestOID)
SetInfoText("Vampires will be killed by restoration magic.")
elseif (a_option == vdesOID)
SetInfoText("Vampires will be killed by destruction magic.")

endif
endevent

event OnOptionSelect(int option)
if (option == silOID)
silkill = !silkill
SetToggleOptionValue(silOID, silkill)
elseIf (option == sunOID)
sunkill = !sunkill
SetToggleOptionValue(sunOID, sunkill)
elseIf (option == fireOID)
firekill = !firekill
SetToggleOptionValue(fireOID, firekill)
elseIf (option == daedraOID)
daedrakill = !daedrakill
SetToggleOptionValue(daedraOID, daedrakill)
elseIf (option == desOID)
deskill = !deskill
SetToggleOptionValue(desOID, deskill)
elseIf (option == restOID)
restkill = !restkill
SetToggleOptionValue(restOID, restkill)
elseif (option == vsilOID)
vsilkill = !vsilkill
SetToggleOptionValue(silOID, vsilkill)
elseIf (option == vsunOID)
vsunkill = !vsunkill
SetToggleOptionValue(sunOID, vsunkill)
elseIf (option == vfireOID)
vfirekill = !vfirekill
SetToggleOptionValue(fireOID, vfirekill)
elseIf (option == vdaedraOID)
vdaedrakill = !vdaedrakill
SetToggleOptionValue(daedraOID, vdaedrakill)
elseIf (option == vdesOID)
vdeskill = !vdeskill
SetToggleOptionValue(vdesOID, vdeskill)
elseIf (option == vrestOID)
vrestkill = !vrestkill
SetToggleOptionValue(restOID, vrestkill)


endIf
endEvent

Script:

Spoiler
Scriptname BBSkel_ResurrectionAbilityScript extends ActiveMagicEffect

float Property ToleranceTime auto
float Property WaitTime auto
Keyword Property WeapMaterialSilver auto
Keyword Property DaedricArtifact auto
Keyword Property WeapTypeSword auto
Keyword Property MagicDamageFire auto
Keyword Property DLC1DawnguardItem auto
Keyword Property MagicSchoolDestruction auto
Keyword Property MagicSchoolRestoration auto
Race Property WerewolfBeastRace auto
Spell Property ResurrectionSpell auto
Spell Property DLC1SunFire auto
Spell Property DLC1SunFireLeft auto
Spell Property DLC1SunCloakDmg auto
Spell Property DLC1VampiresBane auto
Spell Property DisintegrationSpell auto

Actor Skeleton
bool NoResurrection = false
bool Disintegration = false



Event OnEffectStart(Actor akTarget, Actor akCaster)
Skeleton = akTarget
NoResurrection = false
Disintegration = false
endEvent

trulyundead property idin auto

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)

if akSource.HasKeyword(WeapMaterialSilver) == True ;prevents resurrection when hit with Silver weapons
if (idin.silkill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif (akSource.HasKeyword(DaedricArtifact) == True) && (akSource.HasKeyword(WeapTypeSword) == True) ;prevents resurrection when hit with Dawnbreaker
if (idin.daedrakill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif (akAggressor as Actor).GetRace() == WerewolfBeastRace ;prevents resurrection when attacked by a werewolf
if (idin.daedrakill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif akSource.HasKeyword(DLC1DawnguardItem) == True ;prevents resurrection when hit with DawnguardWeapons
if (idin.silkill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif (akSource == DLC1SunFire) || (akSource == DLC1SunFireLeft) ;for Sun Fire Spell
if (idin.sunkill == True)
UnRegisterForUpdate()
NoResurrection = true
Disintegration = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif akSource == DLC1SunCloakDmg ;for Stendarrs Aura Spell
if (idin.sunkill == True)
UnRegisterForUpdate()
NoResurrection = true
Disintegration = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif akSource == DLC1VampiresBane ;for Vampires Bane Spell
if (idin.daedrakill == True)
UnRegisterForUpdate()
NoResurrection = true
Disintegration = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif (akAggressor as Actor).getEquippedItemType(0) == 12 ;(12 == crossbow)
if (akAggressor as Actor).wornHasKeyword(WeapMaterialSilver) ;for the bolts from other mod
if (idin.silkill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif
endif

elseif Skeleton.HasMagicEffectWithKeyword(MagicDamageFire) == True
if (idin.firekill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif Skeleton.HasMagicEffectWithKeyword(MagicSchoolDestruction) == True
if (idin.deskill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif

elseif Skeleton.HasMagicEffectWithKeyword(MagicSchoolRestoration) == True
if (idin.restkill == True)
UnRegisterForUpdate()
NoResurrection = true
;Debug.Trace("NoResurrection set to true")
RegisterForSingleUpdate(ToleranceTime)
endif


else

endif

endEvent

Event OnUpdate()
NoResurrection = false
;Debug.Trace("NoResurrection set to false")
endEvent

Event OnDying(Actor akKiller)

if NoResurrection == True
if Disintegration == True
DisintegrationSpell.Cast(Skeleton, Skeleton)
else
;do nothing
endif

else
Utility.Wait(WaitTime)
ResurrectionSpell.Cast(Skeleton, Skeleton)
endif

endEvent

Another mod I'm working on with the the same problem, but functions this time.

Spoiler
Scriptname Lichperks extends ski_configbase

objectreference property gogo auto

int soulcount = GetItemCount(Form SoulGemBlackFilled)

int soulOID
int none

int ma1OID
int ma2OID
int ma3OID
int ma4OID
int ma5OID
int ma6OID
int ma7OID
int ma8OID
int ma9OID
int ma10OID
int ma

bool ma1 = false
bool ma2 = false
bool ma3 = false
bool ma4 = false
bool ma5 = false
bool ma6 = false
bool ma7 = false
bool ma8 = false
bool ma9 = false
bool ma10 = false

bool hea1 = false
bool hea2 = false
bool hea3 = false
bool hea4 = false
bool hea5 = false
bool hea6 = false
bool hea7 = false
bool hea8 = false
bool hea9 = false
bool hea10 = false

bool arm1 = false
bool arm2 = false
bool arm3 = false
bool arm4 = false
bool arm5 = false
bool arm6 = false
bool arm7 = false
bool arm8 = false
bool arm9 = false
bool arm10 = false

bool dea1 = false
bool dea2 = false
bool dea3 = false
bool dea4 = false
bool dea5 = false
bool dea6 = false
bool dea7 = false
bool dea8 = false
bool dea9 = false
bool dea10 = false

bool undea1 = false

int hea1OID
int hea2OID
int hea3OID
int hea4OID
int hea5OID
int hea6OID
int hea7OID
int hea8OID
int hea9OID
int hea10OID
int hea

int dea1OID
int dea2OID
int dea3OID
int dea4OID
int dea5OID
int dea6OID
int dea7OID
int dea8OID
int dea9OID
int dea10OID
int dea

int undea10OID
int undea

int arm1OID
int arm2OID
int arm3OID
int arm4OID
int arm5OID
int arm6OID
int arm7OID
int arm8OID
int arm9OID
int arm10OID
int arm

event OnConfigInit()
Pages = new string[5]
Pages[0] = "Transcended soul"
Pages[1] = "Essence of unlife"
Pages[2] = "Presence of death"
Pages[3] = "Necro flesh"

endEvent

event OnPageReset(string a_page)

if (a_page == "Transcended soul")

event OnPageReset(string page)
int soulOID = AddToggleOption("Number of souls to use", none)
ma1OID = AddToggleOption("Rank 1", ma)
ma2OID = AddToggleOption("Rank 2", ma)
ma3OID = AddToggleOption("Rank 3", ma)
ma4OID = AddToggleOption("Rank 4", ma)
ma5OID = AddToggleOption("Rank 5", ma)
ma6OID = AddToggleOption("Rank 6", ma)
ma7OID = AddToggleOption("Rank 7", ma)
ma8OID = AddToggleOption("Rank 8", ma)
ma9OID = AddToggleOption("Rank 9", ma)
ma10OID = AddToggleOption("Rank 10", ma)

elseif (a_page == "Necro flesh")
int soulOID = AddToggleOption("Number of souls to use", none)
arm1OID = AddToggleOption("Rank 1", arm)
arm2OID = AddToggleOption("Rank 2", arm)
arm3OID = AddToggleOption("Rank 3", arm)
arm4OID = AddToggleOption("Rank 4", arm)
arm5OID = AddToggleOption("Rank 5", arm)
arm6OID = AddToggleOption("Rank 6", arm)
arm7OID = AddToggleOption("Rank 7", arm)
arm8OID = AddToggleOption("Rank 8", arm)
arm9OID = AddToggleOption("Rank 9", arm)
arm10OID = AddToggleOption("Rank 10", arm)

elseif (a_page == "Presence of death")
int soulOID = AddToggleOption("Number of souls to use", none)
dea1OID = AddToggleOption("Rank 1", dea)
dea2OID = AddToggleOption("Rank 2", dea)
dea3OID = AddToggleOption("Rank 3", dea)
dea4OID = AddToggleOption("Rank 4", dea)
dea5OID = AddToggleOption("Rank 5", dea)
dea6OID = AddToggleOption("Rank 6", dea)
dea7OID = AddToggleOption("Rank 7", dea)
dea8OID = AddToggleOption("Rank 8", dea)
dea9OID = AddToggleOption("Rank 9", dea)
dea10OID = AddToggleOption("Rank 10", dea)

elseif (a_page == "Essence of unlife")
int soulOID = AddToggleOption("Number of souls to use", none)
hea1OID = AddToggleOption("Rank 1", hea)
hea2OID = AddToggleOption("Rank 2", hea)
hea3OID = AddToggleOption("Rank 3", hea)
hea4OID = AddToggleOption("Rank 4", hea)
hea5OID = AddToggleOption("Rank 5", hea)
hea6OID = AddToggleOption("Rank 6", hea)
hea7OID = AddToggleOption("Rank 7", hea)
hea8OID = AddToggleOption("Rank 8", hea)
hea9OID = AddToggleOption("Rank 9", hea)
hea10OID = AddToggleOption("Rank 10", hea)

endif
endevent

event OnOptionHighlight(int a_option)
if (a_option == ma1OID)
SetInfoText("Each rank gives you +10 to your magicka and +5% to your magicka regen rate while in lich form.")
elseif (a_option == soul1OID)
SetInfoText("You have:", soulcount, "to use")
endif
endevent

event OnOptionSelect(int option)
if (option == ma1OID)
if (soulcount == 1)
if ma1 == false
ma1 = true
soulcount = soulcount-1
RemoveItem(Form SoulGemBlackFilled, Int 1)
ma = ma+1
SetToggleOptionValue(ma1OID, ma)
endif
endif

User avatar
alyssa ALYSSA
 
Posts: 3382
Joined: Mon Sep 25, 2006 8:36 pm

Post » Sun Nov 10, 2013 10:08 am

Is it just the one bool, or all of them? It looks like the property to the mcm quest isn't filled.

User avatar
Abel Vazquez
 
Posts: 3334
Joined: Tue Aug 14, 2007 12:25 am


Return to V - Skyrim