Home   Help Search Login Register  

Author Topic: Idiot AI drivers  (Read 449 times)

0 Members and 1 Guest are viewing this topic.

Pravit

  • Guest
Idiot AI drivers
« on: 18 Jul 2005, 06:20:43 »
Is it just me or do AI drivers actually drive differently based on camera positions? I'm doing a cutscene where a guy drives down a road real fast. He drives fine when I use a camera position behind him, but when I use a position in front of him, he drives off the road EVERY SINGLE TIME and screws up the scene.

Another question I had is about camsetrelpos. I thought it would work something like getting the position of the camera target, then adding x, y, or z to it based off of what you gave to it. But unless I'm mistaken it seems to take the direction of the target into account as well, that is, if a unit has a heading of 270 degrees, then _cam camsetrelpos [0, 50, 0] would set the camera 50 meters left along the X axis instead of 50 meters up along Y.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Idiot AI drivers
« Reply #1 on: 18 Jul 2005, 06:32:19 »
I've never seen AI try to avoid 'hitting' a camera.

Yes, you're right about the setrelpos command. The coordinates are not in relation to the map, but in relation to the object. In other words, you're setting a position relative to the object.
[0,50,0] will always be 50 meters ahead of the object, no matter which way it's heading.

snYpir's cam tutorial has it pretty well explained. Everyone who's doing scripted cutscenes should read it.  :)
Not all is lost.

Pravit

  • Guest
Re:Idiot AI drivers
« Reply #2 on: 18 Jul 2005, 07:04:22 »
Thanks for your reply, Artak! As for the camera thing, it may have been caused I think because I was a bit ambiguous with the markers I was setting as the places he needed to drive to. At first I was only using one marker off the side of the road; I was hoping I started him off far enough that he would drive down the road, then pull over. He did actually do this in one camera setting(behind) but he would only drive off the road on the other, don't know why. At any rate I fixed it by putting two markers, one on the road, and one right next to it where he needed to pull over.