Home   Help Search Login Register  

Author Topic: setVehiclePosition  (Read 1820 times)

0 Members and 1 Guest are viewing this topic.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
setVehiclePosition
« on: 15 Feb 2010, 04:40:11 »
Can someone tell me if this command, setVehiclePosition,  actually does anything? I am trying to randomly place a editor placed unit. I know I can just create a vehicle and do it a similar way, but nothing is happening with this command... I just want to make sure it is broken.
TS3 IP: tor.zebgames.com:9992

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: setVehiclePosition
« Reply #1 on: 15 Feb 2010, 08:39:04 »
Works fine here..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: setVehiclePosition
« Reply #2 on: 15 Feb 2010, 13:22:31 »
Init file:

Code: [Select]

if (isserver)then
{
_box = HOZ_BOMB setVehiclePosition [[2061.8525,21.288868,2347.99], ["bomb_pos1","bomb_pos2","bomb_pos3","bomb_pos4"], 0]
};


HOZ_BOMB is the name of the object. The first array is the actual position of the object in the editor. The 4 marker pos are empty and are properly named as the array says.
TS3 IP: tor.zebgames.com:9992

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: setVehiclePosition
« Reply #3 on: 15 Feb 2010, 14:29:42 »
Leave the position to [0,0,0].
If there's no position given it will use the marker positions instead..
Quote
If the markers array contains more than one marker name, the position of a random one is used.
Otherwise, the given position is used.
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: setVehiclePosition
« Reply #4 on: 16 Feb 2010, 11:36:02 »
ok thank you, will try it out.
TS3 IP: tor.zebgames.com:9992

Offline Ironman

  • Former Staff
  • ****
    • {GSF} Home Page
Re: setVehiclePosition
« Reply #5 on: 23 Feb 2010, 01:05:25 »
still not working. I have no idea where it is placing this unit.

EDIT:

when I use it as "Player" it works fine. But when I use a empty object/vehicle it doesn't seem to work. Well, not entirely true... I noticed it puts the object into the ground.

EDIT:

Init of empty car:
this setVehiclePosition [[0,0,0], ["pos1_obj1","pos2_obj1","pos3_obj1","pos4_obj1"], 0]; this setpos [getpos this select 0, getpos this select 1, +0];

This spawns the car on top of the ground but it is finicky.... the car dissapears if you are not looking at it from the correct angle. Also, you can not destroy the car with anything.
« Last Edit: 23 Feb 2010, 01:31:00 by Ironman »
TS3 IP: tor.zebgames.com:9992

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: setVehiclePosition
« Reply #6 on: 23 Feb 2010, 10:39:05 »
So it does.
Ok, so the command is buggy, or they have just meant it to be used on man class vehicles misleadingly naming it with "vehicle" instead of "unit".. :dunno:
Although it works on tanks, they don't sink, they jump a bit but stay above the ground. Didn't test if they get invulnerable in the process though.

So I guess you need to use the old fashion group-vehicle-with-marker method for the vehicles..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.