Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Crew Script
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Crew Script (Read 537 times)
0 Members and 1 Guest are viewing this topic.
chills
Guest
Crew Script
«
on:
13 Jan 2003, 01:07:04 »
This is a script which respawns vehicles and its the best by Doolitle! But I need to have my crew of tanks/Helicopter crew respawn inside the vehicles instead of telling them to enter the vehicles. I added some coding but it doesnt seem to work.
If any of you script experts can have a look and tell me where i am going wrong?
;Script by Doolittle, dbircsak@earthlink.net
? not local Server : exit
_obj = _this select 0
_pos = getPos _obj
_dir = getDir _obj
_type = typeOf _obj
_
#clear
_t = 0
_vcl = _this select 0
_driver = _this select 1
_gunner = _this select 2
_commander = _this select 3
_driver moveindriver _vcl
_gunner moveingunner _vcl
_commander moveincommander _vcl
#alive
~3
? not alive _obj : _delay = 10; goto "notalive"
? fuel _obj == 1 : goto "clear"
? count crew _obj != 0 : goto "clear"
? _t == 0 : _t = _time + 22
? _t > _time : goto "alive"
"_obj removeMagazine _x" forEach magazines _obj
_obj setFuel 0
_obj setDamage 1
_delay = 10
#notalive
~_delay
deleteVehicle _obj
~1
_obj = _type createVehicle _pos
_obj setDir _dir
goto "clear"
Logged
Ottie
Members
And you think this is personal
Re:Crew Script
«
Reply #1 on:
13 Jan 2003, 10:19:09 »
What are the arguments you pass to the script:
I see that u use two time _this select 0, and is this the complete script
Logged
If you can't beat them, buy them
chills
Guest
Re:Crew Script
«
Reply #2 on:
13 Jan 2003, 14:30:04 »
Yes this is the whole script, ecxept I put this in
_vcl = _this select 0
_driver = _this select 1
_gunner = _this select 2
_commander = _this select 3
_driver moveindriver _vcl
_gunner moveingunner _vcl
_commander moveincommander _vcl
All i want is my crew spawn into the newly spawned vehicle.
Any Ideas?
«
Last Edit: 13 Jan 2003, 14:30:52 by chills
»
Logged
Ottie
Members
And you think this is personal
Re:Crew Script
«
Reply #3 on:
13 Jan 2003, 17:29:34 »
Question,
do you create the crew with a createUnit or is the crew already created and do you call the script in the following manner:
[vehicle, driver, gunner, commander] exec "veh_respawn.sqs"
If not you have to create the crew of the vehicle.
Logged
If you can't beat them, buy them
chills
Guest
Re:Crew Script
«
Reply #4 on:
14 Jan 2003, 01:57:15 »
What i do is use it in multiplayer. The crew are part of my group, so they are already made. It works when we first join the game but when the new vehicle spawns we do not move in the vehicle.
[vehicle, driver, gunner, commander] exec "veh_respawn.sqs" I use that in the vehicle.
Have you any ideas? I have tried to solve this one for along time and I'm getting frustrated
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
Crew Script
Top of page