Talk:Tree Script

There are no discussions on this page.

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

-- egocarib (talk) 2014-08-28T22:17:50 (EDT)

Return to "Tree Script" page.