OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Grinning_Giant on 20 Jun 2003, 14:00:35

Title: Get Out and Stay Out!
Post by: Grinning_Giant on 20 Jun 2003, 14:00:35
Hi Guys,

I used this script to boot a passenger out of a bus I'm driving.

Code: [Select]
;[B1, PA1] exec "Getout.sqs"

_Bus = _this select 0
_Man = _this select 1

#Update
? speed _Bus < 5 : goto "Getout"
~0.5
goto "Update"

#Getout
_Man action ["EJECT",_Bus]
exit

The passenger was added using the MoveinCargo command.

The problem is; as soon as the guy ejects he runs to get back in my bus again... What command do I use to make him get out and move to his next waypoint on foot.
Title: Re:Get Out and Stay Out!
Post by: VUSN042 on 20 Jun 2003, 14:14:27
Try unassigning him from the vehicle before ejecting him...
Title: Re:Get Out and Stay Out!
Post by: deaddog on 20 Jun 2003, 14:15:39
Insert this line after the action command:

unassignvehicle _man

This is always needed after using the "eject" action.

 :)


*EDIT*

Yeah, what he said...  ;D
Title: Re:Get Out and Stay Out!
Post by: Grinning_Giant on 20 Jun 2003, 14:24:31
 8) Good work guys!

Thanks  :-*