Data Realms Fan Forums http://45.55.195.193/ |
|
Adding Terrain http://45.55.195.193/viewtopic.php?f=73&t=14988 |
Page 1 of 1 |
Author: | Darlos9D [ Wed May 27, 2009 12:01 am ] |
Post subject: | Adding Terrain |
Simple question: how does one use Lua to add some new terrain to the scene? I'm not sure what Create function to call, nor am I sue which Add function to call. |
Author: | Grif [ Wed May 27, 2009 1:54 am ] |
Post subject: | Re: Adding Terrain |
As far as I know from looking at docs, there's no actual function to add terrain. However, you should be able to force an MO to auto settle within one sim update with a few of the MOSprite functions. |
Author: | TheLastBanana [ Wed May 27, 2009 1:56 am ] |
Post subject: | Re: Adding Terrain |
There is SceneMan:AddTerrainObject() but I'm not sure how to create a terrain object in the first place. |
Author: | Grif [ Wed May 27, 2009 2:01 am ] |
Post subject: | Re: Adding Terrain |
Do it the same way as create functions? bunkermodule = SceneMan:CreateTerrainObject("Closed Tomb"); bunkermodule.Pos = Vector(2000,1000); SceneMan:AddTerrainObject(bunkermodule); Absolutely no idea if that'd work but it's worth a shot, I guess. |
Author: | Darlos9D [ Wed May 27, 2009 2:16 am ] |
Post subject: | Re: Adding Terrain |
Grif wrote: Do it the same way as create functions? bunkermodule = SceneMan:CreateTerrainObject("Closed Tomb"); bunkermodule.Pos = Vector(2000,1000); SceneMan:AddTerrainObject(bunkermodule); Absolutely no idea if that'd work but it's worth a shot, I guess. Tried that already. Didn't work out. On a somewhat related note, SceneManager:AddSceneObject() tends to crash the game a couple seconds after you use it to add something. You definitely want to stick to using specific MovableManager:Add functions. |
Author: | Daman [ Wed May 27, 2009 1:18 pm ] |
Post subject: | Re: Adding Terrain |
Darlos9D wrote: Grif wrote: Do it the same way as create functions? bunkermodule = SceneMan:CreateTerrainObject("Closed Tomb"); bunkermodule.Pos = Vector(2000,1000); SceneMan:AddTerrainObject(bunkermodule); Absolutely no idea if that'd work but it's worth a shot, I guess. Tried that already. Didn't work out. On a somewhat related note, SceneManager:AddSceneObject() tends to crash the game a couple seconds after you use it to add something. You definitely want to stick to using specific MovableManager:Add functions. Well, movablemanager doesn't include bunker modules. AddSceneObject allows you to. |
Author: | Darlos9D [ Wed May 27, 2009 4:20 pm ] |
Post subject: | Re: Adding Terrain |
I said "on a somewhat related note." AddSceneObject() crashes the game seconds after calling it no matter what you use it for, which blows and needs to be fixed. Which just makes adding terrain that much more impossible. |
Author: | mail2345 [ Thu May 28, 2009 5:32 am ] |
Post subject: | Re: Adding Terrain |
Grif wrote: As far as I know from looking at docs, there's no actual function to add terrain. However, you should be able to force an MO to auto settle within one sim update with a few of the MOSprite functions. ^ Is the best option. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |