Home   Help Search Login Register  

Author Topic: AI on second floor or roof.....  (Read 665 times)

0 Members and 1 Guest are viewing this topic.

Offline GomerPyle

  • Members
  • *
  • OFPEC rocks.....
AI on second floor or roof.....
« on: 26 Feb 2003, 15:36:24 »
I want to create a sniper on a roof. But its seems like he is standing on the ground inside the building (sometimes hes not there) If i put this line on him this SetPos[getpos this select 0,getpos this select 1] he keeps falling to the ground. Through the building of all things. Its almost like the building isnt there.

Do i have to do something to the building?

GameLogic or something?

Please help....

Thx in advance

It worked after some testing: this SetPos[getpos this select 0,getpos this select 1,8]. But i could not make him stay on the middle floor. He was either on the floor or the roof...(Tried to change the last number "height") Any ideas.....
« Last Edit: 26 Feb 2003, 15:53:19 by GomerPyle »

Uberminch

  • Guest
Re:AI on second floor or roof.....
« Reply #1 on: 26 Feb 2003, 17:00:39 »
what do u mean "he was either on the floor or the roof?

if you keep varying the setpos height number he should eventually end up on the floor u want. it works for me anyway.

Knut Erik

  • Guest
Re:AI on second floor or roof.....
« Reply #2 on: 26 Feb 2003, 18:19:55 »
Try this..

First create a man. (it doesnt mather who he is because u're going to delete him when you're done.) In the init field of the unit type this exec "camera.sqs" When u now press the preview u will see nothing but a cross. Move around with W A S D. Up and down is Q and Z
Move to there you want the unit to stand, then press ctrl. (It is not enough to point the location with the cross. The camera must be where the unit shall stand.) Press ALT+Tab. Go to your operationflashpoint folder. There should be a file named clipboard. There it is something like this.

;=== 18:07:14
_camera camSetTarget [9973.44,104005.64,27.21]
_camera camSetPos [9973.44,4005.64,2.00]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera

What you need to consentrate on is this line:
_camera camSetPos [9973.44,4005.64,2.00]  
Copy this part [9973.44,4005.64,2.00] (It will not be same numbers as here) and paste it into the unit you want to stand where the camera was's init field. Then type: this setpos [9973.44,4005.64,2.00]

Voilla! I'm not so very good in english, so if you need further explanation, just ask  ;D

Offline GomerPyle

  • Members
  • *
  • OFPEC rocks.....
Re:AI on second floor or roof.....
« Reply #3 on: 26 Feb 2003, 21:12:26 »
Thanks.....  :)

Rokket

  • Guest
Re:AI on second floor or roof.....
« Reply #4 on: 02 Mar 2003, 08:21:48 »
I put a sniper on the roof just by placing him there, no setpos. Then I put "stealth" or combat or danger or whatever it is in his init field, put myself next to him and observed: he starts standing on roof, then goes prone and sights with weapon. First time he was too close to edge and when he went prone he fell off side...