Home   Help Search Login Register  

Author Topic: spawn empty vehicles  (Read 452 times)

0 Members and 1 Guest are viewing this topic.

George Kaplin

  • Guest
spawn empty vehicles
« on: 04 Sep 2003, 02:49:11 »
hi

just getting started, and I can;t figure out how to spawn empty vehicles for the players to use - they all appear crewed.

thanks for any help!

B-2-0

  • Guest
Re:spawn empty vehicles
« Reply #1 on: 04 Sep 2003, 03:20:46 »
If u just mean placing them on the map, u have to double click where u want the vehicle and when the menu comes up, click the 'Side' box (top left) and select 'Empty'.

Head over to the 'Editors Dept.' and browse the 'Tutorials' section for some great info on getting going editor-wise. ;)http://www.ofpec.com/editors/browse.php?category=1_1

If u mean vehicle respawn then try this.... ;)

Place the vehicles on the map where u want them to respawn (empty ones of course) and name each one.

To execute, enter into each vehicle init field:  
Code: [Select]
[vehiclename,time] exec "VehicleRespawn.sqs"
Copy and paste the following script in to notepad and call it VehicleRespawn.sqs but make sure that, when saving, u set it to 'All files' so u don't end up with VehicleRespawn.sqs.txt ;)

If you have not got Winter Kolgujev island u can use this script...
Code: [Select]
?!(local server) : exit
_vehic = _this select 0
_time = _this select 1
_type = typeof _vehic
_pos = getpos _vehic
_dir = getdir _vehic

#loop
@!(alive _vehic)
~_time
deletevehicle _vehic
_vehic = _type createvehicle [0,0]
_vehic setpos _pos
_vehic setdir _dir
_vehic setdamage 0
goto "loop"

If u have Winter Kolgujev island u can use the following script instead to get a nice explosion and fire effect whilst you wait for the vehicle to respawn 8)

Code: [Select]
?!(local server) : exit
_vehic = _this select 0
_time = _this select 1
_type = typeof _vehic
_pos = getpos _vehic
_dir = getdir _vehic

#loop
_vehic addEventHandler ["killed", {[[0,0,0],[0,0,0],60,3+random 3,_this select 0] exec "\KEGnoecain_snow\script\destroy.sqs"}]
@!(alive _vehic)
~_time
deletevehicle _vehic
_vehic = _type createvehicle [0,0]
_vehic setpos _pos
_vehic setdir _dir
_vehic setdamage 0
goto "loop"

Stick the relevant script into your mission folder and away u go 8)
« Last Edit: 04 Sep 2003, 03:31:24 by B-2-0 »