Difference between revisions of "Talk:Variables and Properties"
Jump to navigation
Jump to search
→=
imported>PsiSoldier |
imported>Fg109 (→=) |
||
Line 30: | Line 30: | ||
Ah, I think I figured it out. I'll keep all of this up here in case someone else might benefit from it. I'm so used to Oblivion and how quests own variables. So I was assuming that I should be able to something like MyQuest.IntProp. But that's not the case. I have to attach a quest property (value MyQuest) to my AME script because that's the quest wherein the variable of interest lies. However, the property "IntProp" doesn't belong to MyQuest, it belongs more specifically to the script to which it it attached. So, if I want to use the properties of MyQuest, I have to cast the QST property as MyQuestScript, since the script contains the property I want. --[[User:Doulos|Doulos]] 14:49, 11 February 2012 (EST) | Ah, I think I figured it out. I'll keep all of this up here in case someone else might benefit from it. I'm so used to Oblivion and how quests own variables. So I was assuming that I should be able to something like MyQuest.IntProp. But that's not the case. I have to attach a quest property (value MyQuest) to my AME script because that's the quest wherein the variable of interest lies. However, the property "IntProp" doesn't belong to MyQuest, it belongs more specifically to the script to which it it attached. So, if I want to use the properties of MyQuest, I have to cast the QST property as MyQuestScript, since the script contains the property I want. --[[User:Doulos|Doulos]] 14:49, 11 February 2012 (EST) | ||
---- | |||
I am trying to do something similar to above working with a script on an ActiveMagicEffect trying to access a property or rather properties from a QuestScript but I'm having difficulty with compiler errors Ive tried as suggested above to point to my property in the quest script in this way. | I am trying to do something similar to above working with a script on an ActiveMagicEffect trying to access a property or rather properties from a QuestScript but I'm having difficulty with compiler errors Ive tried as suggested above to point to my property in the quest script in this way. | ||
Line 52: | Line 53: | ||
--[[User:PsiSoldier|PsiSoldier]] 14:09, 21 April 2012 (EDT) | --[[User:PsiSoldier|PsiSoldier]] 14:09, 21 April 2012 (EDT) | ||
Correct way: | |||
<source lang="papyrus">PsiNecromancyQuestScript Property PsiNecromancyQuest Auto | |||
;;; | |||
if PsiNecromancyQuest.HasHastenDead == 1</source> | |||
Alternatively: | |||
<source lang="papyrus">Quest Property PsiNecromancyQuest Auto | |||
;;; | |||
if (PsiNecromancyQuest as PsiNecromancyQuestScript).HasHastenDead == 1</source> | |||
--[[User:Fg109|Fg109]] 14:34, 21 April 2012 (EDT) | |||
== "Warnings" Unclear == | == "Warnings" Unclear == |