Hi!
I'm experimenting a bit with a script that is supposed to keep track of the players relations with three factions. I have the script done, and it's compiling correctly. However, when I try to use my functions outside the script to increase or decrease the value, nothing happens. It may be that I am thinking in a different way than Papyrus, but does anyone have any input?
Spoiler
Scriptname HeFactionScript extends Quest Int Property HeBrFaction = 0 AutoInt Property HeNoFaction = 0 AutoInt Property HeAlFaction = 0 Auto Quest Property HeBrQuest AutoQuest Property HeBrBad AutoQuest Property HeNoQuest AutoQuest Property HeNoBad AutoQuest Property HeAlQuest AutoQuest Property HeAlBad Auto ;Breton functions Function StartBrQuest() if HeBrFaction <= 10 HeBrQuest.SetStage (10) elseif HeBrFaction <= -10 HeBrBad.SetStage (10) endIf EndFunction Function BrOperand(Int Nr) HeBrFaction += Nr StartBrQuest() EndFunction ;---------------------------------------; ;Nord functions Function StartNoQuest() if HeNoFaction <= 10 HeNoQuest.SetStage (10) elseif HeNoFaction <= -10 HeNoBad.SetStage (10) endIf EndFunction Function NoOperand(Int Nr) HeNoFaction += Nr StartNoQuest() EndFunction ;---------------------------------------; ;Altmer functions Function StartAlQuest() if HeAlFaction <= 10 HeAlQuest.SetStage (10) elseif HeAlFaction <= -10 HeAlBad.SetStage (10) endIf EndFunction Function AlOperand(Int Nr) HeAlFaction += Nr StartAlQuest() EndFunction ;---------------------------------------;
From this script I wanted to be able to use the "Operand"-functions in quests and such to increase/decrease the reputation of the player. I made a test-script that I put on an activator.
Spoiler
Scriptname HeFactionChangeScript extends ObjectReference HeFactionScript property refScript auto Event OnActivate(ObjectReference akActionRef) Debug.MessageBox ("Your status increased in Mathmallari") refScript.AlOperand(1) EndEvent
This is where my problem is. My second script does not affect my first script!
Thank you for your patience! ![:smile:](http://www.gamesas.com/images/smilie/smile.png)
![:smile:](http://www.gamesas.com/images/smilie/smile.png)