OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Jim666 on 08 May 2004, 12:49:52
-
Okay, i got a respawn for cars and such, but when they blow to pieces and come back, you cant go back into them?.. which is a problem
?!(local Server): Goto "end"
_vcl = _this select 0
_respawndelay = 20
_dir=Getdir _vcl
_position=Getpos _vcl
_Vehicles=[]
_WTrucks=["Truck5tOpen","Truck5tRepair","Truck5tReammo","Truck5tRefuel","Truck5t"]
_ETrucks=["UralRepair","UralReammo","UralReFuel","Ural"]
_CivTrucks=["TruckV3SGCivil","TruckV3SGRefuel","TruckV3SGRepair","TruckV3SGReammo","TruckV3SG"]
_Jeeps=["JeepMG","GJeep","HMMWV","UAZ","SGUAZG","UAZG","Jeep"]
_Cars=["Tractor","Rapid","RapidY","Skoda","SkodaBlue","SkodaRed","SkodaGreen","Trabant"]
_Helos=["Cobra","AH64","CH47D","OH58","UH60MG","UH60","Mi24","Mi17"]
_Planes=["Cessna","A10LGB","A10","SU25"]
_WArmor=["M1Abrams","M60","Bradley","M113Ambul","Vulcan","M113","BoatW","M2StaticMG"]
_EArmor=["T80","T72","BMP2","BMPAmbul","BMP","BRDM","BoatE","ZSU","T55G"]
_Other=["Mash"]
_Vehicles=_WTrucks+_ETrucks+_CivTrucks+_Jeeps+_Cars+_Helos+_Planes+_WArmor+_EArmor+_Other
_i = 0
#Loop
? (_i > (Count _Vehicles)) : Goto "Skip"
_VehicleType = _Vehicles Select _i
_VehicleTypeDoesMatch = ((_VehicleType CountType _this) == 1)
? _VehicleTypeDoesMatch : _type = _VehicleType
? _VehicleTypeDoesMatch : Goto "Skip"
_i = _i + 1
Goto "Loop"
#Skip
#specialinits
?(_type=="cessna"):goto "cessna"
?(_type=="OH58"):goto "OH58"
#start
~2
?(Canmove _vcl):goto "start"
~_respawndelay
deleteVehicle _vcl
_vcl = _type createVehicle _position
_vcl setdir _dir
#specialrearming
?(_type=="cessna"):goto "cessna"
?(_type=="OH58"):goto "OH58"
Goto "start"
#cessna
_vcl addweapon "MaverickLauncher"
_vcl addweapon "MachineGun30A10"
_vcl addweapon "LaserGuidedBombLauncher"
_vcl addweapon "ZuniLauncher38"
_vcl removemagazines "MaverickLauncher"
_vcl removemagazines "MachineGun30A10"
_vcl removemagazines "LaserGuidedBombLauncher"
_vcl addmagazine "MaverickLauncher"
_vcl addmagazine "MachineGun30A10"
_vcl addmagazine "LaserGuidedBombLauncher"
_vcl addmagazine "ZuniLauncher38"
goto "start"
#OH58
_vcl removemagazine "LaserDesignatorOH"
_vcl removeweapon "LaserDesignatorOH"
goto "start"
#end
Exit
knowing me its probably messed up somewhere, any ideas?..
-
Know this is an oldy, but had too much time to browse this forum & hope you solved in meanwhile ;D
But maybe someone else could use the answer:
_vcl lock False
for the respawning vehicle in ur script
-
Hey Jim
I know some vehicle scripts do take a while to let you back in to the vehicle. If you play maps that use createvehicle (MFCTI , Crime City, Battlefield etc) you will notice there is a small wait before you can get into the vehicle.
How long do you wait until it lets you back into the vehicle?
-
you need to reveal the vehicle to the player.
respawned vehicles or units, even stuff that's been setpos'd to another location, takes a while to show up on AI 'radar', hence the pause.
oh, and jimboob - change your avatar url. the link's broken.