Mattiewagg Posted August 16, 2014 Share Posted August 16, 2014 (edited) Alright. So I have a system set up for a conversation - several conditional properties on a conditional script for my quest, and in the begin and end fragments of the quests dialogue some of those properties will be added to or decreased. Then, different dialogue is chosen based on GetVMQuestVariable. But only the default dialogue that doesn't use the property - in case something goes wrong, I don't want there to just be ... - ever is said. I've isolated the issue to the properties not being set, since after the fragment where it was supposed to set it I had a Debug.Notification print out the property's value - still 0. This is what the fragment looks like (there are many others like it, but they all look pretty much like this): IQ01Vars.IQ01Morality += 1 And the actual script fragment, when you open it up, looks like this: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment ;NEXT FRAGMENT INDEX 2 Scriptname IQ_TIF__02001842 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_1 Function Fragment_1(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE IQ01Vars.IQ01Morality += 1 ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment IQ01VarsFunctions Property IQ01Vars Auto IQ01Vars refers to the script containing the properties, which looks like this: Scriptname IQ01VarsFunctions extends Quest Conditional {Holds the VM Quest Vars and functions for IQ01.} Int Property IQ01Morality Auto Conditional {Based on how the player reacted during the conversation, how moral are they?} Int Property IQ01JoricDeathStage Auto Conditional {At what stage was Joric killed?} Int Property IQ01AydronDeathStage Auto Conditional {At what stage did Aydron die?} Int Property IQ01JoricSpokenTo Auto Conditional {Have you spoken to Joric yet?} Int Property IQ01AydronCondescend Auto Conditional {Have you been spoken to condescendingly by Aydron?} Int Property IQ01AydronMet Auto Conditional {Have you met Aydron before?} Float Property PlayerWeight Auto Conditional {The players weight} ActorBase Property PlayerBase Auto Event OnInit() If IQControlQuestScript.SKSEInstallCheck(); this is a global function ;SKSE Installed Utility.Wait(1.0) PlayerWeight = PlayerBase.GetWeight() EndIf EndEvent The issue is that none of the VMQuestVariables are working. None of them are being set (actually the playerweight one works). Does anybody know why? EDIT: Okay, I tried this instead: Int Morality = IQ01Vars.IQ01Morality Morality += 1 And then used a debug.messagebox to check the values of both. It looks like adding to morality makes it = 1, if it was at 0, but iq01vars.iq01morality stays at 0. Edited August 16, 2014 by Matthiaswagg Link to comment Share on other sites More sharing options...
Mattiewagg Posted August 16, 2014 Author Share Posted August 16, 2014 I'm just going to try globals instead. It just means about 6 globals, which I consider a lot. Oh well. If anyone does have a solution, that would be really helpful. Link to comment Share on other sites More sharing options...
Mattiewagg Posted August 16, 2014 Author Share Posted August 16, 2014 The global variables worked like a charm. Link to comment Share on other sites More sharing options...
Recommended Posts