Home   Help Search Login Register  

Author Topic: Objects move  (Read 1113 times)

0 Members and 1 Guest are viewing this topic.

blackbuddy

  • Guest
Objects move
« 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
« Last Edit: 01 Dec 2005, 21:02:07 by citizen potato »

marcus3

  • Guest
Re:Objects move
« Reply #1 on: 01 Dec 2005, 20:58:40 »
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  ;)

Durbs

  • Guest
Re:Objects move
« Reply #2 on: 01 Dec 2005, 21:06:11 »
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

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Objects move
« Reply #3 on: 01 Dec 2005, 21:18:45 »
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



« Last Edit: 01 Dec 2005, 21:19:48 by Planck »
I know a little about a lot, and a lot about a little.

Offline Morglor9

  • Members
  • *
Re:Objects move
« Reply #4 on: 02 Dec 2005, 04:02:48 »
Does that work with editor-placed buildings, or only ones that come default on the map?
Cymbaline

LoTekK

  • Guest
Re:Objects move
« Reply #5 on: 02 Dec 2005, 06:44:30 »
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).
« Last Edit: 02 Dec 2005, 06:45:52 by LoTekK »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Objects move
« Reply #6 on: 02 Dec 2005, 10:14:49 »
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.

blackbuddy

  • Guest
Re:Objects move
« Reply #7 on: 02 Dec 2005, 13:56:56 »
Thanks to you all,

These replies were very helpfull, I think I gonna use the buildingpos command together with some gamelogics.

cheers, Citizen Potato