Difference between revisions of "Talk:Tree Script"
imported>Terra Nova2 |
imported>Egocarib m |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
The wiki is kind of a barren desert. You'll have better chances asking about this here: http://forums.bethsoft.com/topic/1505304-wipz-skyrim-script-extender/page-4#entry23748557 | The wiki is kind of a barren desert. You'll have better chances asking about this here: http://forums.bethsoft.com/topic/1505304-wipz-skyrim-script-extender/page-4#entry23748557 | ||
or here: http://forums.bethsoft.com/forum/184-the-creation-kit/ --[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-08-28T08:36:01 (EDT) | or here: http://forums.bethsoft.com/forum/184-the-creation-kit/ --[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-08-28T08:36:01 (EDT) | ||
It is possible, however, you will need to have the Tree.psc in your scripts\Source folder (the psc files are used for compilation, not the pex). However, it won't be possible to fill a tree property using the CK, since this is a special type added by SKSE. To fill a tree property in your script you will have to use [[GetFormFromFile_-_Game|GetFormFromFile]] and cast it as a Tree. Also, be warned that there has been a discussion among SKSE developers about changing the name of Tree script to something else in future versions of SKSE (because "tree" turns out to be a common variable name among many users, so introducing this new type broke many people's old scripts), so your scripts may need to be updated in the future if that happens for any mods in which you're using Tree objects. Here is an example of how to get a Tree into your script: | |||
<source lang="papyrus"> | |||
Scriptname ExampleTreeScript extends ObjectReference | |||
Tree property TreePineForestSnow01 auto hidden | |||
Event OnInit() | |||
TreePineForestSnow01 = Game.GetFormFromFile(0x0005C072, "Skyrim.esm") as Tree | |||
EndEvent | |||
</source> | |||
-- [[User:Egocarib|egocarib]] ([[User talk:Egocarib|talk]]) 2014-08-28T22:17:50 (EDT) |
Latest revision as of 21:19, 28 August 2014
It doesn't appear to be possible to define Tree properties on other scripts. The CK throws errors, as if the "Tree" script doesn't exist; this, when the *.PEX file exists in the scripts directory (and is listed in the CK's script manager). No clue why. DavidJCobb (talk) 2014-08-27T21:14:27 (EDT)
The wiki is kind of a barren desert. You'll have better chances asking about this here: http://forums.bethsoft.com/topic/1505304-wipz-skyrim-script-extender/page-4#entry23748557 or here: http://forums.bethsoft.com/forum/184-the-creation-kit/ --Terra Nova2 (talk) 2014-08-28T08:36:01 (EDT)
It is possible, however, you will need to have the Tree.psc in your scripts\Source folder (the psc files are used for compilation, not the pex). However, it won't be possible to fill a tree property using the CK, since this is a special type added by SKSE. To fill a tree property in your script you will have to use GetFormFromFile and cast it as a Tree. Also, be warned that there has been a discussion among SKSE developers about changing the name of Tree script to something else in future versions of SKSE (because "tree" turns out to be a common variable name among many users, so introducing this new type broke many people's old scripts), so your scripts may need to be updated in the future if that happens for any mods in which you're using Tree objects. Here is an example of how to get a Tree into your script:
Scriptname ExampleTreeScript extends ObjectReference
Tree property TreePineForestSnow01 auto hidden
Event OnInit()
TreePineForestSnow01 = Game.GetFormFromFile(0x0005C072, "Skyrim.esm") as Tree
EndEvent