OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: DarkCell on 23 Oct 2003, 20:23:51
-
I still don't get it What is wrong with this Script?
Can someone Copy a Vehicle Script in this Topic plz?
So I can Copy it over and don't have the problem that Vehicles Double REspawn :P
Many Thnx ! :)
BTW this is my script tell me if something has to be deleted or changed if so...
;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
~_vdelay
deleteVehicle _obj
~1
_obj = _vehicle select _type createVehicle _pos
_obj setDir _dir
goto "init"
-
1 more thing! I have this problem with Multyplayer so plz HELP ME! :-\
-
you still havent answered the question whether you created a game logic called "Server" ???
-
ah sorry :-\
But I don't have A GameLogic Called server in my map why you ask? ???
-
lol
?not local Server : exit
the script line refers to a game logic named "server"
game logics are only local to the server and therefore are used to run a script only on the server. The name of the game logic could be anything, but as a general rule we use the name "server"
what is basically happening is that your respawn script is not running on the 1 machine it should run on which is the server, this would account for your problems
make a game logic anywhere on the map and simply name it "server"
-
Darkcell, could you keep it to one thread per topic please?
All replies to this thread to here (http://www.ofpec.com/yabbse/index.php?board=7;action=display;threadid=13823)
# Topic Locked