View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:41 pm



Reply to topic  [ 8 posts ] 
 Adding Terrain 
Author Message
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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.


Wed May 27, 2009 12:01 am
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Wed May 27, 2009 1:54 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Adding Terrain
There is SceneMan:AddTerrainObject() but I'm not sure how to create a terrain object in the first place.


Wed May 27, 2009 1:56 am
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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.


Wed May 27, 2009 2:01 am
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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.


Wed May 27, 2009 2:16 am
Profile YIM
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post 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.


Wed May 27, 2009 1:18 pm
Profile
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post 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.


Wed May 27, 2009 4:20 pm
Profile YIM
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post 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.


Thu May 28, 2009 5:32 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.046s | 16 Queries | GZIP : Off ]