Sign in to follow this  
Followers 0
Pixel

Using prefabs in a script

9 posts in this topic

Is there any way I can use a prefab I made, and implement it to move via script? I can't make it a script_(anything)...

I need to move the prefabs along a certain axis by script.

0

Share this post


Link to post
Share on other sites

a prefab is brushes, so you just make it a brushmodel?

0

Share this post


Link to post
Share on other sites

a prefab is brushes, so you just make it a brushmodel?

I tried, but the classname stays at misc_prefab. I tried changing it, but it crashed radiant.

0

Share this post


Link to post
Share on other sites

A prefab is just a ".map" file inside your prefab folder. Open up the prefab in radiant as a map, select everything in that map file and open the map you want to move it to, it will ask "copy selection?" hit yes and it will move the prefab over as seperate entities per object.

Everything inside the ".map" that you moved to the new one will now be a seperate entity in the map for you to edit separately

0

Share this post


Link to post
Share on other sites

I knew you could do that, it's just the prefab I made has a lot of brush pieces. I will just use selection to select all inside when managing it. Thanks Troll

0

Share this post


Link to post
Share on other sites

If I'm not wrong you can group brushes together when you right click on the 2D view. If I'm right and that is a feature in radiant, I think you can also group it and move it around as one.. not sure though :P

1

Share this post


Link to post
Share on other sites

If I'm not wrong you can group brushes together when you right click on the 2D view. If I'm right and that is a feature in radiant, I think you can also group it and move it around as one.. not sure though :P

^this, you can weld brushes together if they're only touching in one place by selecting the two brushes and pressing w.

Or you could also use the layers feature to put each prefab as a layer so you can select it all at once, hide it, and get even more time saving effects.

1

Share this post


Link to post
Share on other sites

or make them all the same script_brushmodel and then alt+shift+leftclick on one part and it'll select all the parts :)

2

Share this post


Link to post
Share on other sites

^this, you can weld brushes together if they're only touching in one place by selecting the two brushes and pressing w.

Or you could also use the layers feature to put each prefab as a layer so you can select it all at once, hide it, and get even more time saving effects.

I've never seen the welding feature work properly. It has never welded anything for me :s

or make them all the same script_brushmodel and then alt+shift+leftclick on one part and it'll select all the parts :)

Thanks for the shortcut Sentrex :D

0

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0