Home   Help Search Login Register  

Author Topic: Advanced Setpos Stuff  (Read 487 times)

0 Members and 1 Guest are viewing this topic.

Kaliyuga

  • Guest
Advanced Setpos Stuff
« on: 03 Jun 2003, 19:20:25 »
  hmm.. I have the code to raise/lower objects via the setpos command engraved on my brain from years of use ;D

but until now I've never needed to use the setpos command to move an object to the left/right  front/back at all....

so if the part of the script relevant to the question looks like this:

_startPos = getPos(_vehicle)


how would i make said object appear about 3 meters to the left and 1 meter behind    _vehicle ?

thanks in advance for any info... :cheers:

and no i don't care to elaborate on the problem whatsoever ;D

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:Advanced Setpos Stuff
« Reply #1 on: 03 Jun 2003, 19:43:51 »
 ;D I've created a function for that exact type of use. No matter where the vehicle is, and what its heading is, you'll get the position 3 meters to the left and 1 meter behind  it.
Get the function here :

http://www.ofpec.com/editors/funcref.php?filter_func=36

So the position of your object should be :

_myobjectpos=[_vehicle,-3,-1] call RelPosCoord

Hope that's what you were looking for...

 :cheers:
« Last Edit: 03 Jun 2003, 19:54:26 by Igor Drukov »

Kaliyuga

  • Guest
Re:Advanced Setpos Stuff
« Reply #2 on: 03 Jun 2003, 20:00:39 »
 Thanks a ton.... I'll have a look at that straight away

:cheers: