OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: DarkCell on 22 Oct 2003, 23:06:50
-
AHH NO! Player Respawn Problem is fixed but now I got a Vehicle Respawn PROB! :o >:(
Everytime I get outa the Car or Tank or whatever My Vehicle Disapears and Respawns at base,But that's not all! when I got in a Car and got out THERE WHERE 2 CARS! ???
This is some realy weird shit.....
PLZzz HELP ME SOMEONE! :'( :-[
-
sounds like you have the respawn script working on more than just the server machine and as for the vehicle respoawning when you get out that sounds simply like you need to add a delay check for when the script checks to see if the vehicle is empty
this of course is simply guesswork without seeing the script u r using
-
This is the Script I'm Using PLz tell me what is wrong with it :-\
;by Doolittle
_obj = _this select 0
?not local Server : exit
_vdelay = 150
?count _this > 1 : _vdelay = _this select 1
_air = ["Cobra", "Cessna", "A10LGB", "A10", "AH64", "Kamov", "Mi17", "Mi24", "OH58", "Su25", "UH60", "UH60MG"]
_armored = ["BMPRes", "BMP2", "BMP", "BoatE", "BRDM", "CarrierW", "M2StaticMGE", "M2StaticMG", "M113", "M1Abrams", "Bradley", "M60", "BoatW", "ZSU", "T55G", "T72Res", "T72", "T80Res", "T80", "Vulcan"]
_car = ["Truck5tOpen", "Truck5t", "Kolo", "Bus", "SkodaBlue", "SkodaGreen", "SkodaRed", "Skoda", "Mini", "HMMWV", "GJeep", "JeepPolice", "JeepMG", "Jeep", "Jawa", "TruckV3SCivil", "TruckV3SG", "Scud", "RapidY", "Rapid", "Trabant", "Tractor", "UAZG", "UAZ", "Ural"]
_support = ["Truck5tReammo", "BMPAmbul", "M113Ambul", "TruckV3SGReammo", "TruckV3SGRefuel", "TruckV3SGRepair", "Truck5tRefuel", "Truck5tRepair", "SGUAZG", "UralReammo", "UralRefuel", "UralRepair"]
_vehicle = _air + _support + _armored + _car
_pos = getPos _obj
_dir = getDir _obj
_i = 0
_c = count _vehicle
_type = 0
#count
?_vehicle select _i countType [_obj] != 0 : _type = _i; _i = count _vehicle
_i = _i + 1
?_i < _c : goto "count"
#init
_t = 0
#alive
~1
?not alive _obj : _delay = _vdelay; goto "notalive"
?fuel _obj == 1 : goto "init"
?count crew _obj != 0 : goto "init"
?_t == 0 : _t = _time + vdelay
?_t > _time : goto "alive"
#notalive
~_delay
deleteVehicle _obj
~1
_obj = _vehicle select _type createVehicle _pos
_obj setDir _dir
goto "init"
-
do you have a gamelogic called "server"
-
Hey I changed
#init
_t = 0
to
#init
_t = 1000000
And now the Vehicles won't Respawn anymore when exit :D
And they Don't even Double Respawn Anymore Problem is Fixed But Thnx Anyway :P ;D
-
?_t == 0 : _t = _time + vdelay
?_t > _time : goto "alive"vdelay should be _vdelay, if you haven't defined the vdelay somewhere as a global variable.
Because vdelay doesn't exist _t will be zero and the line ?_t > _time : goto "alive" will never be true, so it continues stright to:
#notalive
~_delay
deleteVehicle _obj
~1
_obj = _vehicle select _type createVehicle _pos
_obj setDir _dir
goto "init"It waits _delay (supposed to be _vdelay ??? ), deletes the vehicle and creates a new one in _pos.
I think fixing those will do the trick. ;D
-
MY VEHICLES STILL DOUBLE RESPAWN!!! :'(
Plz tell me how does my script has to look like?
Plz copy it for me! MANY THNX....MAN I'M NOOB SOMETIMES! :-[ :P
-
My vehicle Doesn't respawn Double anymore becease I added a GameLogic called: Server :) stupid thatI forgotten that :P
But I still have 1 problem left! ::)
My vehicle still respawns after 15 seconds when I exit it
Can someone Tell me what Do I have to change so it respawns after 5 mins or so ???