Home   Help Search Login Register  

Author Topic: setpos problem  (Read 654 times)

0 Members and 1 Guest are viewing this topic.

CrashnBurn

  • Guest
setpos problem
« on: 01 Jan 2003, 13:18:12 »
I must be having a brainf*rt. I want to setpos a gamelogic to the player, but about 100 meters away. It doesn't matter what direction. I used-
logic1 setpos [getpos player select 0, getpos player select 1 + 100]
but got a error zero divisor. Can someone put me back on track ?

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:setpos problem
« Reply #1 on: 01 Jan 2003, 14:05:33 »
I suggest you use parenthesises, as so:

gl setpos[getpos player select 0, (getpos player select 1)+100]

it might get a bit confused by the 1 + 100 there :P don't know about the z co-ordinate, but if it still doesn't work maybe you should put something there too...

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:setpos problem
« Reply #2 on: 01 Jan 2003, 15:44:00 »
Divide by zero error is because there is no Z co-ordinate (unless that your +100 and youve missed a , ).  Either way, put a comma seperating the Y and Z co-ords, and if the Z is nothing then put a 0.