keraunoscopia Posted August 22, 2015 Share Posted August 22, 2015 I tried SpawnPrefab("deciduoustree") in code and DebugSpawn("deciduoustree") in the console, and neither of them work. The same thing with "evergreen" works fine. Does anyone know how to spawn a birchnut tree? Thanks in advance for your help! Link to comment https://forums.kleientertainment.com/forums/topic/57284-cant-spawn-deciduoustree/ Share on other sites More sharing options...
Finerlobster Posted August 22, 2015 Share Posted August 22, 2015 I don't know what is happenin but I found a way to do it.DebugSpawn("deciduoustree_normal").AnimState:PlayAnimation("idle_normal") Link to comment https://forums.kleientertainment.com/forums/topic/57284-cant-spawn-deciduoustree/#findComment-665637 Share on other sites More sharing options...
keraunoscopia Posted August 22, 2015 Author Share Posted August 22, 2015 (edited) I don't know what is happenin but I found a way to do it.DebugSpawn("deciduoustree_normal").AnimState:PlayAnimation("idle_normal")Interesting - thanks! Your code works, but it shows the tree in its "normal" (medium sized) growth stage, with spring/summer foliage. If you want to display the tree in the correct state, it's harder. By experimenting, I figured out that when you spawn a birchnut with DebugSpawn or SpawnPrefab the tree is actually there, but it's invisible. After time has elapsed, it eventually shows up in the correct state. I just haven't figured out what the trigger is, and how trip it on command instead of waiting for an event. Edited August 22, 2015 by keraunoscopia Link to comment https://forums.kleientertainment.com/forums/topic/57284-cant-spawn-deciduoustree/#findComment-665640 Share on other sites More sharing options...
keraunoscopia Posted August 22, 2015 Author Share Posted August 22, 2015 Solved. In code, to display the spawned birchnut tree, you write: local tree = SpawnPrefab("deciduoustree")tree.OnLoad(tree) In other words, you treat the newly spawned tree as if it were being restored from a save. 1 Link to comment https://forums.kleientertainment.com/forums/topic/57284-cant-spawn-deciduoustree/#findComment-665652 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now