Jump to content
Sign in to follow this  
TechnoTerrorist303

Creating items in buildings

Recommended Posts

Well, I searched on this and can't find anything but if there is a thread I've missed someone please point me to it!

I'm building a mission using United Sahrani, as part of this mission I'm trying to set up an "office" in one of the buildings on Rahmadi. To make this look like an office I've created a script in the 3d editor that adds a desk, chair, satphone and laptop inside on of the buildings. It also creates a couple of guards.

My problem is that when the furniture spawns, it always does so on the roof. I go back into the 3d editor to find that it thinks the stuff should be on the roof also. I go back, put the items back into the right place, save the script, call it in the main editor to test and once again the items are on the roof.

Is what I'm trying to do actually impossible or have I done something daft?

Share this post


Link to post
Share on other sites

the 3d editor and the 2d editor don't work exactly the same way. The 3d editor saves 2 files, one file contains the xy coordinates, whereas the other file saves the z coordinates. Best thing to do would be to change the z by hand.

Try:

this setposatl [this getposatl select 0, this geposatl select 1,(this getposatl select 2) + 5]

Inside the init of the items your trying to place. Play with the numbers until you have the right height.

Share this post


Link to post
Share on other sites

Yep I've tried this. When testing the mission in the 2d editor I have all the items from the 3d one spawning from a script on radio command so that I can test effectively. The desk is either on the roof of the building or under the floor.

I'll keep experimenting and see what happens.

Share this post


Link to post
Share on other sites

Have you tried it with the "normal" setPos? I used it to place some stuff into a building and it works...

Share this post


Link to post
Share on other sites
Have you tried it with the "normal" setPos? I used it to place some stuff into a building and it works...

Yes this works, I was having same issues with 3d editor. Try turning off CAN COLLIDE

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  

×