Home   Help Search Login Register  

Author Topic: units that were createvehicle'd do not doMove/Move/commandMove  (Read 589 times)

0 Members and 1 Guest are viewing this topic.

KyleEasterly

  • Guest
Hi, it's me again.

MP mission, tonal island. resistance BAS government officer as playable. name resguy. on init:
Code: [Select]
[(getPos this select 0), (getPos this select 1) + 20, (getPos this select 2), getPos gl_air_spawn select 0, getPos gl_air_spawn select 1, getPos gl_air_spawn select 2] exec "create_govuazdshk_atpos.sqs"
gl_air_spawn is a gamelogic about 2000m away.

file create_govuazdshk_atpos.sqs:
Code: [Select]
; create_govuazdshk_atpos.sqs
; creates government UAZ-DShK at coordinates
; SERVER only
? (!local Server) : exit
_x = _this select 0
_y = _this select 1
_z = _this select 2
_toX = _this select 3
_toY = _this select 4
_toZ = _this select 5

? (IOT_Debug == 1) : hint format["Creating GOV UAZ-DShK at %1, %2, %3", _x, _y, _z]

_tempVeh = "BAS_GUAZDShK" createVehicle [_x, _y, _z]
_tempLdr = "BAS_GovernmentCrew" createVehicle [_x + 10, _y, _z]
_tempLdr moveInDriver _tempVeh
_tempObj = "BAS_GovernmentCrew" createVehicle [_x - 10, _y, _z]
_tempObj moveInGunner _tempVeh

_tempLdr doMove [_toX, _toY, _toZ]

exit

the jeep gets made, the guys get made, they even get in it! but then they just sit there...

things I have tried:
 - different positions, used positions of markers, different objects closer and farther, resguy himself (only 20m away from the uaz-dshk)
 - adding a delay between when the gunner boards and when the doMove is issued. tried 0.5, 1, and 2 seconds
 - not mounting the guys in the uaz, telling _tempLdr doMove [_toX, _toY, _toZ] does nothing either
 - doing [_tempObj] join _tempLdr
in the script, doing _tempLdr doMove getPos gl_air_spawn (also tried getPos resguy, getMarkerPos "markO")
 - tried telling _tempVeh to doMove instead of _tempLdr, tried doing both _tempLdr and _tempObj.
 - tried commandMove and Move
 - to verify that SOMETHING was going on in their little heads I started shooting the uaz with them in it, when it got damaged quite a bit they ejected. however, when I place a west soldier (and I set resistance friendly to nobody) a little in front of them facing away from them, they don't shoot... (he is only 20m away, tried it at distances up to 200m)
 - tried adding them to my group with the guy there, they don't even show up as in my group and STILL dont fire at the guy
 - shot at the west guy so he turned to them, he just started shooting away, killed the driver... that gave me an idea...
 - i shot the west guy, then got in as driver. clicked my mouse to give the "FIRE" command to the gunner, and OFP crashed.

whatever I do these guys will not do anything...

edit:
fixed error in comments of script file
« Last Edit: 05 Feb 2004, 08:44:13 by KyleEasterly »

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Possible solutions:

1) Use the createunit command for the crew instead of the createvehicle command

2) Use global variables for the TempX units instead of local variables
Not all is lost.