OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: blackbuddy on 01 Dec 2005, 20:52:43
-
How could I move units exactly to another place? If I use the domove or move command they stop a few meters in front of they supposed to. This would be very helpfull for cutscenes in buildings. How could this be done?
Citizen Potato
-
make the unit move on its own?, if not
unit setpos getpos place
place = name of a game logic or something
if u are wanting the unit to move there on its own, try placeing the waypoint father away, or maybe put game logics, they move right on top of them ;)
-
If you are talking about trying to get ai to walk in and thru doorways, around objects, ect....good luck! :P
I've wasted far too many hours trying to get AI to act natural....most the time they still act retarded.
But if u can figure out a way....pls let us know :D
-
You can get them to go to a particular position in a building.
Most buildings that can be entered have one or more building positions (buildingPos).
Something like:
unitname move (buildingname buildingPos 1)
or
unitname move ((object 20800) buildingPos 1)
Planck
-
Does that work with editor-placed buildings, or only ones that come default on the map?
-
As far as I'm aware, building pos should work on any building, whether editor-placed, or part of the wrp. Well, as long as the creator included positions, of course. :)
Bear in mind that it's not completely foolproof. The AI in general has some difficulties with building pos, especially for what looks like more complex structures with numerous building positions (the multi-level apartment buildings on nogova, for example).
-
Also be aware of a bug in OFP that means that after a save and then reload the location of buildingPos is likely to have moved. It could be nowhere near the building
If you want to use buildingPos at the start of the mission that should be no problem, but if you want to use the command later, possibly after a save (maybe even after an Abort but I have not checked that) then what I do is create an array of all the buildingPos locations at the start of the mission and use that array from then on.
-
Thanks to you all,
These replies were very helpfull, I think I gonna use the buildingpos command together with some gamelogics.
cheers, Citizen Potato