OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: General Goober on 03 Feb 2003, 23:23:07
-
Need some help please. How do you deploy units in multi storied buildings. I find that when I try to put a unit in one of them, they end up on the roof.
Regards
General Goober
-
well you could try this
this setpos[(getpos this select 0), (getpos this select 1), 5]
change the number on the end until you get them at the right height, or you could place a waypoint on the building and then an extra option is available and you can select a position in the building from that.
-
Try giving the units waypoints inside the building. If you put a waypoint on top of the building, then the waypoint should give you an option to choose which location the unit should go to. Of course, you'll have to experiment to find out which position is the one you want, since the positions are labelled by number instead of a description.
Using a waypoint will cause the unit to move there. The only drawback of this method is that if you need the unit to start there at the instant the mission begins, he won't be there yet. But, if it doesn't matter, then give this solution a try.
-
(Heh, we posted our answers at close to the same time. :) )
this setpos[(getpos this select 0), (getpos this select 1), 5]
change the number on the end until you get them at the right height
Black Feather's method should work, too.
As a hint for finding the right height, create a trigger that is activated by radio code alpha, repeatedly. Make the trigger get the position of a test unit controlled by you, and have it print the coordinates via a hint. Then, walk around the building on the various floors to find out the exact coordinates (including height) that you want. You can then set your unit's position to the appropriate coordinates without a problem.
Good luck! :cheers:
-
Thanks guys. I will give it a try!!!
-
Welcome to the forums too Goober :)
-
Black_Feather. Thanks for your hospitality and may I say very speedy reply to my problem. I am quite new to OFP and its editor. I have found recently that I am getting quite a lot of enjoyment just in the use of the editor itself. I believe none of this would have been possible, if not for this site. I am learning something new here everyday. A big thanks to you and the rest of the team for making all this possible.
-
Black_Feather. As a result of your advice I solved the problem. For everyone's information I found that "11" equaled the fourth floor, "8" equaled the third floor and "5" equaled the 2nd floor. Only issue I have found now is when giving move order to some units they jump out building instead of using stairway. Coming back in also is a problem they just walk through the wall. Any ideas???