View unanswered posts | View active topics It is currently Thu Jan 09, 2025 10:14 pm



Reply to topic  [ 9 posts ] 
 Attachables on terrain objects (like bunker modules) 
Author Message
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post Attachables on terrain objects (like bunker modules)
The title says it all. I can't seem to be able to attach objects to bunker modules yet I remember seeing that vent-like bunker module that had an attached door on it that we could break. Is there any way I can attach things on bunker modules without having CC saying that he cant match property?

Edit : Here is what I'm trying to do

Image

The bottom thing with the girders is the bunker module, the brick parts are the attachables and the lil bricks and stuff are what the attachables should gib into.


Last edited by deathbringer on Fri Sep 25, 2009 2:38 am, edited 1 time in total.



Fri Sep 25, 2009 2:26 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
AddChildObject. Look at the doors in Base.rte for how to do it exactly.


Fri Sep 25, 2009 2:37 am
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
Well, you can't attach it, but I'm fairly certain you can make a pinned MOSRotating object, and then add that as a child object of the bunker module.
Go look at the code for the door bunker modules, and you'll probably be able to figure it out from there.

Okay I could have sworn there were no replies when I wrote this and it usually interrupts adding a post when someone else posts first, but whatever.


Last edited by Azukki on Fri Sep 25, 2009 2:43 am, edited 1 time in total.



Fri Sep 25, 2009 2:41 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
Attachables themselves are an MO-only object.

For what you want, you're probably going to want MOSRotatings, which act as generic MOs with useful properties (picture TDExplosives that aren't thrown)


Fri Sep 25, 2009 2:42 am
Profile
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
Ok I got that child object thingy working, now is there some way to put my attachables OVER the terrain? Now its kinda UNDER it >_>


Fri Sep 25, 2009 2:50 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
function Create(self)
self:EraseFromTerrain();
end


Fri Sep 25, 2009 3:05 am
Profile
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
Grif wrote:
function Create(self)
self:EraseFromTerrain();
end


Not working. I need to stick this lua to the attachable or the bunkermodule?


Fri Sep 25, 2009 3:13 am
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
The child object.


Fri Sep 25, 2009 3:13 am
Profile
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post Re: Attachables on terrain objects (like bunker modules)
So it doesn't work.

Edit : Nvm that, its working now. I switched the attachable to a mosrotating like grif said and now it works perfectly. Thanks a lot!


Fri Sep 25, 2009 3:23 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 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.044s | 14 Queries | GZIP : Off ]