I understand that you have a soldier walking around a truck, not inside the truck. If so, you may use the following:
;Walkaround.sqs by Mandoble
;Arguments
;Walking unit
;Number of steps/2 in initial direction and reverse
;Number of steps/2 in perpendicular direction and reverse
;Number of rounds*2
;
;Example:
;Unit 16 steps forward, turning right,then 8 steps, right, 16 steps, right 8 steps 50 times
;[this,8,4,100]exec"walk.sqs"
_unit = _this select 0
_stepsv = _this select 1
_stepsh = _this select 2
_rounds = _this select 3
_unit setBehaviour "SAFE"
_dir = getDir _unit
_posini = getPos _unit
_r = 0
#round
_i = 0
#govert
_unit playMove "CivilWalkF"
~1
?behaviour _unit != "SAFE":exit
_i = _i + 1
?_i < _stepsv: goto "govert"
_dir = _dir + 90
_unit doWatch [(getPos _unit select 0)+2*sin(_dir),(getPos _unit select 1)+2*cos(_dir), 1.7]
~2
_unit setDir (_dir)
_i = 0
#gohoriz
_unit playMove "CivilWalkF"
~1
?behaviour _unit != "SAFE":exit
_i = _i + 1
?_i < _stepsh: goto "gohoriz"
_dir = _dir + 90
_unit doWatch [(getPos _unit select 0)+2*sin(_dir),(getPos _unit select 1)+2*cos(_dir), 1.7]
~2
_unit setDir (_dir)
_r = _r + 1
;Each 3 rounds the unit is placed at original pos
?_r % 6 == 0:_unit setPos _posini
?_r < (_rounds*2): goto "round"
exit
An example:
Put an ural heading N
Put a soldier heading N at the lower left corner of the Ural, 1.5 meters or so far from the ural's back and from the ural's left side.
Put the following in the soldier's init field:
[this,7,2,50]exec"walkaround.sqs"
The soldier will keep walking around the ural until 100 rounds completed or until he switch from SAFE to anyother behaviour.