Buck0
-
Posts
521 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Articles
Posts posted by Buck0
-
-
both times, spawned on ground
to confirm, this is the code i have used
private ["_Missing","_index","_SpawnPats","_helipadsnear","_nearestpad","_veh","_vehicle","_key","_vehname","_position","_checkkey","_sign"]; _index = _this select 0; if (_index < 0) exitWith {cutText["\n\nNo Vehicle selected!","PLAIN DOWN"]}; _veh = VehStoredList select _index; _vehicle = _veh select 0; _key = _veh select 1; _Missing = ""; _vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName"); if (_vehicle select 0 isKindOf 'Air') then { _SpawnPats = ["Sr_border"]; _Missing = "Helipad"; } else { _SpawnPats = ["HeliHCivil"]; _Missing = "Parking Lot"; }; _helipadsnear = nearestObjects [(getPosATL player),_SpawnPats,50]; if ((count _helipadsnear) < 1) exitWith {cutText["\n\nYou need a "+_Missing+"! Right click on your Toolbox to build one!","PLAIN DOWN"]}; _nearestpad = _helipadsnear select 0; _position = getPos _nearestpad; _location = [_position select 0, _position select 1, _position select 2]; _checkkey = [player,_key] call BIS_fnc_invAdd; if (!(_checkkey)) exitWith {cutText [(localize "str_epoch_player_107"),"PLAIN DOWN"]}; _sign = createVehicle ["Sign_arrow_down_large_EP1",_position,[],0,"CAN_COLLIDE"]; PVDZE_veh_spawn = [player,_vehicle,_sign,VirtualGarage]; publicVariableServer "PVDZE_veh_spawn"; cutText [format["\n\nYou have successfully spawned a %1, %2 has been added to your toolbelt.",_vehname,getText(configFile >> "CfgWeapons" >> _key >> "displayName")],"PLAIN DOWN"]; sleep 2; call garage_getnearVeh; call garage_getstoredVeh;
-
best i could do
-
-
have done all testing same location with same setup
-
what about the changed server_spawnvehicle.sqf?
any results with it?
what about the output in the Rpt? ( search for "Schwede")
22:19:39 "[schwedes-Debug] _location: [10264.1,9966.78,13.4601] | getPos _arrow: [10264.1,9966.78,6.73077]"
22:19:40 "[schwedes-Debug] Object getPos: [10264.1,9966.78,157.491] | getPosASL: [10264.1,9966.78,13.46]"
-
-
Pretty much, if you cant build a server yourself you should really learn, or pay someone for their time to do ig for you
-
Wouldnt something like this be better? As its a defined spawn point
//Overwrite first assignment, if SR_border
{
if (typeOf _x == "SR_border") exitWith {_nearestpad = _x;_SRborder = true;};
} count _helipadsnear;
if (_SRBorder) then {
_getPosATL = getPosATL _nearestpad;
//Spawn a tiny bit above the S_ border, to avoid glitching.
_position = [(_getPosATL select 0),(_getPosATL select 1),((_getPosATL select2)+0.2))];
} else {
_position = getPosATL _nearestpad;
};
-
Spawning to a metal floor seems like a bad idea, multiple levels of a base all with metal floors... whats forcing it to spawn to the one you want?
-
Kk will run it when im home, unless cen gets you the info you need first
-
nope, that spawned it on the ground 2 floors under
-
i placed a helipad ontop of the metal floor, for some reason, its getting all jacked up and adding an additional height parameter ontop of the helipad, it seems the higher it goes, the worse it gets
Would something like this work?
setPosATL [getposATL this select 0, getposATL this select 1, 4];forcing the height variable of 4m above the item? -
-
yeah, i see what you mean, can place the pad on the top level, it literally spawns 15m above it hangs there till takes dmg, falls to ground and blows up
need to adjust the re spawn hight above item, seems to be to much
-
-
doesnt work, client rpt
if (_vehicle isKindOf 'Air') then { _SpawnPats = ["He> Error position: <isKindOf 'Air') then { _SpawnPats = ["He> Error iskindof: Type Array, expected String,Object File mpmissions\__CUR_MP.chernarus\scripts\Garage\garage_spawnvehicle.sqf, line 12
-
Yeah, except we want to limit air vehicles to a specific object and land vehicles to a specific object.
I cant see an easy way of doing it without rewriting the whole spawnvehicle.sqf
-
Yeah i had a look, couldn't figure it out tho
-
I could write up a release for the code i posted, but i dont remember who gave it to me
Doesn't seem right to post it without some form of credits
-
I see we are after the same thing cen
-
write up something for your fn self actions, put it somewhere in the section relating to unlocking a safe
-
Very few people even know how to dump a server Pbo
-
does anyone have something like this for 0verheats version?
-
Something i was given a LONG time ago
private ["_obj"]; _CrackTime = 180; // Time in seconds it takes to crack a safe. _CrackOdds = 20; // Percent chance out of 100 to crack the safe. // ------- CONFIG END ------- _ctTool = {_x == "ItemToolbox"} count items player; _ctCrow = {_x == "ItemCrowbar"} count items player; _ctWire = {_x == "ItemHotwireKit"} count magazines player; _obj = _this select 3; {player removeAction _x} forEach s_player_combi;s_player_combi = []; if ((_ctTool == 0) || (_ctCrow == 0) || (_ctWire == 0)) exitWith {cutText [format["You need a toolbox, crowbar, and hotwire kit to crack a safe."], "PLAIN DOWN"];}; if ((_ctTool > 0) && (_ctCrow > 0) && (_ctWire > 0)) then { startcracking = true; player playActionNow "Medic"; _dis=10; _sfx = ""; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; DZE_ActionInProgress = true; r_interrupt = false; _animState = animationState player; r_doLoop = true; _started = false; _finished = false; _overallTime = time; while {r_doLoop} do { [player,_sfx,0,false,_dis] call dayz_zombieSpeak; _animState = animationState player; _isMedic = ["medic",_animState] call fnc_inString; if (_isMedic) then { _started = true; }; if(!_isMedic && !r_interrupt && (time - _overallTime) < _CrackTime) then { player playActionNow "Medic"; _isMedic = true; }; if (_started && !_isMedic && (time - _overallTime) > _CrackTime) then { r_doLoop = false; _finished = true; lastBloodbag = time; }; if (r_interrupt) then { r_doLoop = false; }; sleep 0.1; }; if (_finished) then { if ((round(random 100)) < _CrackOdds) then { dayz_combination = _obj getVariable["CharacterID","0"]; dayz_selectedVault = _obj; _obj spawn player_unlockVault; player removeMagazine "ItemHotwireKit"; cutText [format["You have cracked the safe!"], "PLAIN DOWN"]; DZE_ActionInProgress = false; startcracking = false; }else{ cutText [format["You have failed to cracked the safe!"], "PLAIN DOWN"]; player removeMagazine "ItemHotwireKit"; DZE_ActionInProgress = false; startcracking = false; }; } else { r_interrupt = false; player switchMove ""; player playActionNow "stop"; cutText [format["You have stopped cracking the safe!"], "PLAIN DOWN"]; startcracking = false; DZE_ActionInProgress = false; }; };
[Fixed] Virtual Garage - spawnpoints for different Vehicle
in Scripting
Posted
yes the helipad is visible on the roof,
also that last fix did not work :(