Jump to content

GlobalVariables are not passing values to script


tonycubed2

Recommended Posts

I am pulling my few remaining hairs out! This may be game bug. My mod Sands of Time at http://skyrim.nexusmods.com/downloads/file.php?id=12452 is working pretty good and I needed to add some more features and fix a situation bug. But the new Global Variable I added, "Animation" shows as value 5 in the console when running sglv yet when I query it in the script below (an altered player sleep quest script) it shows zero!!! And yes the value is declared properly in properties. I have many other global variables working just fine. Property name is Animation, type Global Variable, property type "globalVAriable" and pick object I picked the global variable. I disabled ALL mods and started a new game. No joy.

 

But I can see it fine in the console. And I can use it fine in a quest dialogue where I use a in game configuration tool to show the player its value. That would be inside a function since it is a

papyrus fragment but that should not matter(?)

 

Maybe the word Animation is reserved?

 

I went as far as deleting the skyrim directory and starting 100% fresh. Version 1.524

 

Help!!!!!!!!

 

:wallbash: :wallbash: :wallbash: :wallbash:

 

 

ScriptName PlayerSleepQuestScript Extends Quest
Import Form
Import Debug
Import Game


Spell Property Rested Auto
Spell Property WellRested Auto
Spell Property MarriageSleepAbility Auto
ReferenceAlias Property LoveInterest Auto
Keyword Property LocTypeInn Auto
Keyword Property LocTypePlayerHouse Auto
Keyword Property LocTypeDungeon Auto
Keyword Property LocTypeDraugrCrypt Auto
Keyword Property Winterhold Auto
Keyword Property LocTypeJorrvaskr Auto
Quest Property RelationshipMarriageFIN Auto
Spell Property pDoomLoverAbility Auto
CompanionsHousekeepingScript Property CHScript Auto
Int Property pSleeping  Auto Conditional
Int Property random5 Auto
Int Property random2 Auto
Int Property ambushnumb Auto
Int Property ambushnum2 Auto
Int Property chance5 Auto
Int Property InnChance Auto
Int Property sleepy5 Auto
;Int Property Dungeonchance Auto
Int DraugrKeepChance
Int AllOtherChance
ActorBase Property Ambushers1 Auto
ActorBase Property Ambushers2 Auto
ActorBase Property Ambushers3 Auto
ActorBase Property Ambushers4 Auto
ActorBase Property Ambushers5 Auto
ActorBase Property Ambushers6 Auto
ActorBase Property Ambushers7 Auto
ActorBase Property Ambushers8 Auto
ActorBase Property Ambushers9 Auto
ActorBase Property Ambushers10 Auto
ActorBase Property Ambushers11 Auto
ActorBase Property Ambushers12 Auto
ActorBase Property Ambushers13 Auto
ActorBase Property Ambushers14 Auto
ActorBase Property Ambushers15 Auto
ActorBase Property Ambushers16 Auto
ActorBase Property Ambushers17 Auto
ActorBase Property Ambushers18 Auto
ActorBase Property Ambushers19 Auto
ActorBase Property Ambushers20 Auto
ActorBase Property Ambushers21 Auto
ActorBase Property Ambushers22 Auto
ActorBase Property Ambushers23 Auto
ActorBase Property Ambushers24 Auto
ActorBase Property Ambushers25 Auto
ActorBase Property Ambushers26 Auto
ActorBase Property Ambushers27 Auto
ActorBase Property Ambushers28 Auto
ActorBase Property Ambushers29 Auto
ActorBase Property Ambushers30 Auto
ActorBase Property Ambushers31 Auto
ActorBase Property Ambushers32 Auto
ActorBase Property Ambushers33 Auto
ActorBase Property Ambushers34 Auto
ActorBase Property Ambushers35 Auto
ActorBase Property Ambushers36 Auto
ActorBase Property Ambushers37 Auto
ActorBase Property Ambushers38 Auto
ActorBase Property Ambushers39 Auto
ActorBase Property Ambushers40 Auto
ActorBase Property Ambushers41 Auto
ActorBase Property Ambushers42 Auto
ActorBase Property Ambushers43 Auto
ActorBase Property Ambushers44 Auto
ActorBase Property Ambushers45 Auto
ActorBase Property Ambushers46 Auto
ActorBase Property Ambushers47 Auto
ActorBase Property Ambushers48 Auto
ActorBase Property Ambushers49 Auto
ActorBase Property Ambushers50 Auto


Function RemoveRested()

;remove all previous rested states
Game.GetPlayer().RemoveSpell(Rested)
Game.GetPlayer().RemoveSpell(WellRested)
Game.GetPlayer().RemoveSpell(MarriageSleepAbility)

EndFunction




Event OnSleepStart(Float afSleepStartTime, Float afDesiredSleepEndTime)
if sleepy5 == 0 
sleepy5 = 10
EndIf
;UpdateCurrentInstanceGlobal(DreamsInn)
;UpdateCurrentInstanceGlobal(AllOther)
;UpdateCurrentInstanceGlobal(DungeonChance)
;UpdateCurrentInstanceGlobal(DraugrKeep)
;UpdateCurrentInstanceGlobal(College)
;UpdateCurrentInstanceGlobal(JorrSOD)
;UpdateCurrentInstanceGlobal(FTravelOdds)
;UpdateCurrentInstanceGlobal(Meditate)
;			Debug.MessageBox("sleep starts!")
If Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypePlayerHouse) == False
;	Debug.MessageBox("its not player house")
	random5 = Utility.RandomInt(1, 100)
	ambushnumb = Utility.RandomInt(1, 10)
	ambushnum2 = ambushnumb
	;test only next two lines
	chance5 = 100
;		Debug.MessageBox("chance after setting to 100: "+chance5)
;		Debug.MessageBox("value of allother: "+AllOther.GetValueInt())
;		Debug.MessageBox("Inn Locations: "+DreamsInn.GetValueInt())
	chance5 = AllOther.GetValueInt()
	If Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeInn) == True
		;chance = InnChance
		chance5 = DreamsInn.GetValueInt()
	EndIf
	If Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeDungeon) == True
		;chance = DungeonChance
		chance5 = DungeonChance.GetValueInt()
		ambushnumb = ambushnum2 + 10
	EndIf
	If Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeDraugrCrypt) == True 
		;chance = DraugrKeepChance
		chance5 = DraugrKeep.GetValueInt()
		ambushnumb = ambushnum2 + 20
	EndIf
	If Game.GetPlayer().GetCurrentLocation().HasKeyword(Winterhold) == True 
		;chance = College of Winterhold
		chance5 = College.GetValueInt()
		ambushnumb = ambushnum2 + 30
	EndIf
	If Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeJorrvaskr) == True 
		chance5 = JorrSOD.GetValueInt()
		ambushnumb = ambushnum2 + 40
	EndIf
	If random5 <= chance5
		pSleeping = 1
		;Utility.WaitMenuMode(Utility.RandomInt(1, 6))
		Float SleepStart = afSleepStartTime * 24
		Float SleepEnd = afDesiredSleepEndTime * 24
		Float SleepTime = (SleepEnd - SleepStart) - 1
		Utility.WaitMenuMode(Utility.RandomFloat(0, SleepTime))
		Game.DisablePlayerControls(ablooking = True, abCamSwitch = True)
		Game.ForceFirstPerson()
		ObjectReference PlayerRef = Game.GetPlayer()
		Game.GetPlayer().MoveTo(PlayerRef)
		Debug.MessageBox("Ambush!")
		random2 = Utility.RandomInt(1, 100)
		Debug.MessageBox("Animation: "+Animation.GetValueInt())
		if Animation.GetValueInt() == 0
		Woozy.Apply()
		Game.GetPlayer().PlayIdle (WakeUp)
		Utility.Wait (1)
		EndIf
		If ambushnumb == 1		
			PlayerRef.PlaceActorAtMe (Ambushers1, 1).StartCombat(Game.GetPlayer())
		ElseIf ambushnumb == 2
			PlayerRef.PlaceActorAtMe (Ambushers2, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 3
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())	
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers6, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 4
			PlayerRef.PlaceActorAtMe (Ambushers4, 1).StartCombat(Game.GetPlayer())	
			PlayerRef.PlaceActorAtMe (Ambushers7, 1).StartCombat(Game.GetPlayer())
		ElseIf ambushnumb == 5
			PlayerRef.PlaceActorAtMe(Ambushers5, 1).StartCombat(Game.GetPlayer())	
			PlayerRef.PlaceActorAtMe (Ambushers8, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 6
			PlayerRef.PlaceActorAtMe (Ambushers6, 1).StartCombat(Game.GetPlayer())	
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 8).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 7
			PlayerRef.PlaceActorAtMe (Ambushers7, 1).StartCombat(Game.GetPlayer())	
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers9, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 8
			PlayerRef.PlaceActorAtMe (Ambushers8, 1).StartCombat(Game.GetPlayer())	
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers12, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 9
			PlayerRef.PlaceActorAtMe(Ambushers9, 1).StartCombat(Game.GetPlayer())	
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers11, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 10
			PlayerRef.PlaceActorAtMe(Ambushers10, 1).StartCombat(Game.GetPlayer())	
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers13, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 10
			PlayerRef.PlaceActorAtMe(Ambushers10, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 11
			PlayerRef.PlaceActorAtMe(Ambushers11, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers15, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 12
			PlayerRef.PlaceActorAtMe(Ambushers12, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers14, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 13
			PlayerRef.PlaceActorAtMe(Ambushers13, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers15, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 14
			PlayerRef.PlaceActorAtMe(Ambushers14, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers16, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 15
			PlayerRef.PlaceActorAtMe(Ambushers15, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers13, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 16
			PlayerRef.PlaceActorAtMe(Ambushers16, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers18, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 17
			PlayerRef.PlaceActorAtMe(Ambushers17, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 19).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 18
			PlayerRef.PlaceActorAtMe(Ambushers18, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers20, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 19
			PlayerRef.PlaceActorAtMe(Ambushers17, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers19, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 20
			PlayerRef.PlaceActorAtMe(Ambushers20, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers22, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 21
			PlayerRef.PlaceActorAtMe(Ambushers21, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers23, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 22
			PlayerRef.PlaceActorAtMe(Ambushers22, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers21, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 23
			PlayerRef.PlaceActorAtMe(Ambushers23, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe(Ambushers25, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 24
			PlayerRef.PlaceActorAtMe(Ambushers24, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers25, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 25
			PlayerRef.PlaceActorAtMe(Ambushers25, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers29, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 26
			PlayerRef.PlaceActorAtMe(Ambushers26, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers27, 1).StartCombat(Game.GetPlayer())
		ElseIf ambushnumb == 27
			PlayerRef.PlaceActorAtMe(Ambushers27, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers29, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 28
			PlayerRef.PlaceActorAtMe(Ambushers28, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers29, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 29
			PlayerRef.PlaceActorAtMe(Ambushers29, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers31, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 30
			PlayerRef.PlaceActorAtMe(Ambushers30, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers21, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 31
			PlayerRef.PlaceActorAtMe(Ambushers31, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers32, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 32
			PlayerRef.PlaceActorAtMe(Ambushers32, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers34, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 33
			PlayerRef.PlaceActorAtMe(Ambushers33, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers34, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 34
			PlayerRef.PlaceActorAtMe(Ambushers34, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers36, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 35
			PlayerRef.PlaceActorAtMe(Ambushers35, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers36, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 36
			PlayerRef.PlaceActorAtMe(Ambushers36, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers38, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 37
			PlayerRef.PlaceActorAtMe(Ambushers37, 1).StartCombat(Game.GetPlayer())
			PlayerRef.PlaceActorAtMe(Ambushers39, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers3, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 38
			PlayerRef.PlaceActorAtMe(Ambushers38, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers40, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 39
			PlayerRef.PlaceActorAtMe(Ambushers39, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers41, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 40
			PlayerRef.PlaceActorAtMe(Ambushers40, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers42, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 41
			PlayerRef.PlaceActorAtMe(Ambushers41, 2).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers43, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 42
			PlayerRef.PlaceActorAtMe(Ambushers42, 2).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers44, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 43
			PlayerRef.PlaceActorAtMe(Ambushers43, 3).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers46, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 44
			PlayerRef.PlaceActorAtMe(Ambushers44, 2).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers47, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 45
			PlayerRef.PlaceActorAtMe(Ambushers45, 2).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers48, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 46
			PlayerRef.PlaceActorAtMe(Ambushers46, 2).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers48, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 47
			PlayerRef.PlaceActorAtMe(Ambushers47, 3).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers49, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 48
			PlayerRef.PlaceActorAtMe(Ambushers48, 2).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers50, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 49
			PlayerRef.PlaceActorAtMe(Ambushers49, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers50, 1).StartCombat(Game.GetPlayer())
			EndIf
		ElseIf ambushnumb == 50
			PlayerRef.PlaceActorAtMe(Ambushers50, 1).StartCombat(Game.GetPlayer())
			if random2 > 75 
			PlayerRef.PlaceActorAtMe (Ambushers47, 1).StartCombat(Game.GetPlayer())
			EndIf
		EndIf
		Game.EnablePlayerControls()
	EndIf
EndIf
EndEvent



Event OnSleepStop(Bool abInterrupted)
If pSleeping == 0
	; 	debug.trace(self + "Player is sleeping")
	If CHScript.PlayerHasBeastBlood == 1 && Utility.RandomInt(1, 100)>50
		; 		Debug.Trace(Self + "Player is werewolf; no restedness on sleep.")
		RemoveRested()
		BeastBloodMessage.Show()
		;Debug.Notification("Your beast blood keeps you from restful sleep....")
	ElseIf Game.GetPlayer().HasSpell(pDoomLoverAbility) == 0
		;don't run this if player has the Lover sign
		If RelationshipMarriageFIN.IsRunning() == True && RelationshipMarriageFIN.GetStage() > 10 && Game.GetPlayer().GetCurrentLocation() == LoveInterest.GetActorRef().GetCurrentLocation()
			; 			debug.trace(Self + "Giving player the Lover's Comfort spell on Sleep End")
			MarriageRestedMessage.Show()
			RemoveRested()
			Game.GetPlayer().AddSpell(MarriageSleepAbility, abVerbose = False)
		ElseIf Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypeInn) == True
			; 			debug.trace(Self + "Giving player the Well Rested spell for sleeping in an Inn")	
			WellRestedMessage.Show()
			RemoveRested()
			Game.GetPlayer().AddSpell(WellRested, abVerbose = False)
		ElseIf Game.GetPlayer().GetCurrentLocation().HasKeyword(LocTypePlayerHouse) == True
			; 			debug.trace(Self + "Giving player the Well Rested spell for sleeping in Player House")	
			Game.GetPlayer().AddSpell(WellRested, abVerbose = False)
		Else
			; 			debug.trace(Self + "Giving player the Rested spell for sleeping")	
			RestedMessage.Show()
			RemoveRested()
			Game.GetPlayer().AddSpell(Rested, abVerbose = False)
		EndIf
	EndIf
ElseIf pSleeping == 1
	pSleeping = 0
EndIf	
EndEvent

Message Property RestedMessage  Auto  

Message Property WellRestedMessage  Auto  

Message Property MarriageRestedMessage  Auto  

Message Property BeastBloodMessage  Auto

ImageSpaceModifier Property Woozy  Auto  

Idle Property WakeUp  Auto  


GlobalVariable Property DreamsInn Auto
GlobalVariable Property Allother Auto
GlobalVariable Property DungeonChance Auto
GlobalVariable Property DraugrKeep Auto
GlobalVariable Property College Auto
GlobalVariable Property JorrSOD Auto  
GlobalVariable Property FTravelOdds Auto 
GlobalVariable Property Meditate Auto 
GlobalVariable Property Animation Auto  

Link to comment
Share on other sites

Solved. Its a problem with the ckit. I simply made a new global variable with a diffrent name and it worked just fine. Moral of this story: DO NOT ASSUME YOU ARE DOING SOMETHING WRONG. The ckit and the game are far fron perfect.
Link to comment
Share on other sites

  • Recently Browsing   0 members

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