

Kabs
-
Content Count
47 -
Joined
-
Last visited
-
Medals
Posts posted by Kabs
-
-
Hello together,
atm i am trying to add a function for giving points to medics wich have revived someone. As i am not so good with coding maybe someone can help me out. I would definately give regards for my project.
so here comes the facts:
some base code of how player makes points on kills.
ScriptName "server\onplayerkilled.sqf";
if (isServer) then
{
[format ["server\onplayerkilled.sqf %1",_this]] execVM "debug.sqf";
PRIVATE ["_killed","_killer","_killedside","_killerside","_points","_killerunit"];
_killed = _this select 0;
_killer = _this select 1;
_killedside = _this select 2;
_points = 1;
if (_killedside == SIDE_WEST) then {EGES = (EGES + _points);PublicVariable "EGES";};
if (_killedside == SIDE_EAST) then {WGES = (WGES + _points);PublicVariable "WGES";};
if ((alive _killer) && (_killer != _killed)) then
{
if ((side _killer) == west) then {_killerside = SIDE_WEST;};
if ((side _killer) == east) then {_killerside = SIDE_EAST;};
if ((_killedside == _killerside) && (_killerside != SIDE_CIV) && ((count (crew _killer))>0)) then
{
_killerunit = ((crew _killer) select 0);
[] call compile format ["%1SCORE = %1SCORE - %2;PublicVariable ""%1SCORE"";",(vehiclevarname _killerunit),_points];
};
if ((_killedside != _killerside) && ((count (crew _killer))>0)) then
{
_killerunit = ((crew _killer) select 0);
[] call compile format ["%1SCORE = %1SCORE + %2;PublicVariable ""%1SCORE"";",(vehiclevarname _killerunit),_points];
};
};
};
this i want to have a similar function for the stiuation ive someone revived. a look here in the BTC_first_aid.sqf where i want the point for the reviver to get.
if (Alive player) thenit would be great if someone can help me out here since i am really stucked.
greetz and thanks in advance
Kabs
-
deserted vehicles ;)
thoose wich left behind by players for whatever reason on the battlefield. they should respawn as in simple respawn script.
Greetz
Kabs
-
hey richard,
would it be possible to inbound a script for left behind vehicles to respawn ?
greetz
kabs
-
thought it fixed that, but only in editor preview. on my server, the gun is still missplaced. gotta look into that maybe some more..This is how i fixed it for server:
if(typeOf _gun in _L) then {_gun attachto [_veh,[0,-2.4,0.30]];_gun setDir 360;_gun setPos getPos _gun;};
if(typeOf _gun in _LT) then {_gun attachto [_veh,[0,-2.4,0.30]];_gun setDir 360;_gun setPos getPos _gun;};
but now i have problems with the remove action. the guns trying to get to ground but ending again on the offroader.
-
found out that static at gets destroyed when mounted.Edit: This fixes it. With new namecheck.
_LT = ["I_static_AT_F","O_static_AT_F","B_static_AT_F"];
if(typeOf _gun in _LT) then {_gun attachto [_veh,[0,-1.5,0.26]];_gun setDir 180;_gun setPos getPos _gun;};
thought it fixed that, but only in editor preview. on my server, the gun is still missplaced. gotta look into that maybe some more..
-
I am searching for a way to get the player out of them if they didnt have the required rank.
i tried trigger (gamelogic axis=0):
condition:
(vehicle player isKindOf "O_Mortar_01_F" and rank player == "private" and player == driver vehicle player)
anyobdy in mood of help :)?
Thnx in advance!
greetz
Kabs
---------- Post added at 00:41 ---------- Previous post was at 23:16 ----------
*SOLVED*
got it just make detection to:
(vehicle player isKindOf "StaticMortar" and rank player == "private" and player == gunner vehicle player)
-
@ Kabs -I think there might be a setObjectTextureglobal
well yeah i allready figured that out as u can red above ;)
addactions are available when you are in the drivers / passenger seat. Might be a nice option to choose whether acctions are available when you are in the vehicle or you HAVE to be outside of the vehicle.jep, true. it seems unrealistic in any way. but i would set this optional too for good.
-
found out that static at gets destroyed when mounted.
Edit: This fixes it. With new namecheck.
_LT = ["I_static_AT_F","O_static_AT_F","B_static_AT_F"];
if(typeOf _gun in _LT) then {_gun attachto [_veh,[0,-1.5,0.26]];_gun setDir 180;_gun setPos getPos _gun;};
-
Update:
i have problems with loading thoose textures in mp on my root server, they only work in editor preview atm. may this be in cause of the code Richard ?
edit: it was a global command needed. so it was the settexture code beeing wrong from me :)
-
-
@Kinch@anyone: just out of the line.. do you guys know a good C&H Framework with is counting flag capture levels points ?
Well for the HQ i hope you find a solution. dont really know if mixing with BTC would be possible.
-
BTW: John, do you know where i can get a good C&H template? i am searching for a framework wich counts points for flag cap levels.
-
This is great Richard ! Thank you very much :D i am really new to coding as you can see :Ú
will test that asap.
BTW: do you know where i could get a good C&H script? still searching for a framework wich is nice.
greetz
kabs
-
np dont push yourself :) make it at ease. maybe i´ll lokk into somth.
-
Can you guys confirm this script is well, or did i miss something ?
/////////////////////////////////// V1.1 ////////////////////////////////////**************************************************************************
Add to vehicle's init in the editor
null = [this] execVM "scripts\MHQVehicleInit.sqf";
***************************************************************************/
_spawnDelay = 20; // Respawn timer
/**************************************************************************/
///////////////////////////////////////////////////////////////////////
/////////////////////////// VEHICLE ACTIONS ///////////////////////////
MHQ_vehAction2 =
{
_this addAction
["Prepare truck for weapon","support\scripts\truck_initv2.sqf",
nil, 1, false, true, "",
"alive _this && {speed _this == 0}"];
publicVariable "VEH_vehAction1";
};
// Keep all added actions Above Server Check
if (!isServer) exitWith {};
///////////////////////////////////////////////////////////////////////
//////////////////// INIT MHQ / Actions / Extra ///////////////////////
/**************************************************************************
List of actions, sqf's, and any other functions to call on vehicle spawn
or vehicle destroyed
***************************************************************************/
MHQ_VehicleInit =
{
private ["_vehAction1","_vehAction2","_state","_vehicle"];
_vehicle = _this select 0;
_vehName = _this select 1;
_state = _this select 2; // 1 - onSpawn; 0 - onDestroyed;
_nameCheck = ["Offroad1", "Offroad2", "Offroad3", "Offroad4", "Offroad5", "Offroad6", "Offroad7", "Offroad8"]; // Use the actual names of the vehicles given in the editor here.
// Vehicle spawn/Init
if (_state == 1) then
{
// vehicles 3,4,5,6 will use this code
if (_vehName in _nameCheck) then
{
MU = [_vehicle,"MHQ_vehAction2",nil,true] spawn BIS_fnc_MP;
_vehicle setObjectTexture [0,"ambience\modules\images\fia_camo.paa"];
_vehicle setObjectTexture [1,"ambience\modules\images\fia_camo.paa"];
};
_nameCheck2 = ["Offroad5", "Offroad6", "Offroad7", "Offroad8"]; // Use the actual names of the vehicles given in the editor here.
// Vehicle spawn/Init
if (_state == 1) then
{
// vehicles 3,4,5,6 will use this code
if (_vehName in _nameCheck2) then
{
MU = [_vehicle,"MHQ_vehAction2",nil,true] spawn BIS_fnc_MP;
_vehicle setObjectTexture [0,"ambience\modules\images\USWoodland512.paa"];
_vehicle setObjectTexture [1,"ambience\modules\images\USWoodland512.paa"];
};
_nameCheck3 = ["Truck1", "Truck2", "Truck3", "Truck4", "Truck5", "Truck6", "Truck7", "Truck8", "Truck9", "Truck10", "Truck11", "Truck12", "Truck13", "Truck14", "Truck15", "Chopper1", "Chopper2", "Chopper3", "Chopper4"]; // Use the actual names of the vehicles given in the editor here.
// vehicles 3,4,5,6 will use this code
if (_vehName in _nameCheck3) then
{
_vehicle setObjectTexture [0,"ambience\modules\images\fia_camo.paa"];
_vehicle setObjectTexture [1,"ambience\modules\images\fia_camo.paa"];
_vehicle setObjectTexture [2,"ambience\modules\images\fia_camo.paa"];
_heli setObjectTexture [0,"ambience\modules\images\fia_camo.paa"];
_heli setObjectTexture [1,"ambience\modules\images\fia_camo.paa"];
_heli setObjectTexture [2,"ambience\modules\images\fia_camo.paa"];
};
_nameCheck4 = ["Chopper5", "Chopper6", "Chopper7", "Chopper8", "Truck18", "Truck19", "Truck20", "Truck21", "Truck22", "Truck23", "Truck24", "Truck25", "Truck26", "Truck27", "Truck28", "Truck29", "Truck30", "Truck31", "Truck32", "Truck33"]; // Use the actual names of the vehicles given in the editor here.
// vehicles 3,4,5,6 will use this code
if (_vehName in _nameCheck4) then
{
_vehicle setObjectTexture [0,"ambience\modules\images\USWoodland512.paa"];
_vehicle setObjectTexture [1,"ambience\modules\images\USWoodland512.paa"];
_vehicle setObjectTexture [2,"ambience\modules\images\USWoodland512.paa"];
_heli setObjectTexture [0,"ambience\modules\images\USWoodland512.paa"];
_heli setObjectTexture [1,"ambience\modules\images\USWoodland512.paa"];
_heli setObjectTexture [2,"ambience\modules\images\USWoodland512.paa"];
};
// vehciles one and two will use this code
if (!(_vehName in _nameCheck)) then
{
// call addaction functions
//_vehAction1 = [_vehicle,"MHQ_vehAction1",nil,true] spawn BIS_fnc_MP;
// Execute external Sqf's
// If these two don't work then you could try to use call compile with _vehName instead of _vehicle
_vehicle setObjectTexture [0,"ambience\modules\images\fia_camo.paa"];
_vehicle setObjectTexture [1,"ambience\modules\images\fia_camo.paa"];
};
};
};
// Vehicle Destroyed - If there's nothing to do then delete this if statement
/**************************************************************************
The Rest of the Script - Edit at your own risk
***************************************************************************/
_vehicle = _this select 0;
_NameCached = _this select 1;
_oNL = objNull;
// Loop until vehicle is valid
if (_vehicle == _oNL)then
{
while {_vehicle == _oNL} do { sleep 0.5; _vehicle = _this select 0;};
};
// Get vehicle name and position
_vehName = vehicleVarName _vehicle;
_vehiclepos = getPos _vehicle;
_vehicledir = getDir _vehicle;
_classname = typeOf _vehicle;
// Loop variables
_vehKilled = false;
_run = true;
// Init actions, etc
sleep 1;
call {[_vehicle,_vehName, 1] call MHQ_VehicleInit};
while {_run} do
{
sleep 1; // rest between cycles
if (!(alive _vehicle)) then
{
_vehKilled = true;
// Process Additional Destroyed functions
call {[_vehicle,_vehName, 0] call MHQ_VehicleInit};
sleep 1;
};
if (_vehKilled) then
{
sleep _spawnDelay;
deleteVehicle _vehicle;
sleep 4;
// set vehicle position and name
_vehicle = _classname createVehicle _vehiclepos;
_vehicle setPos _vehiclepos;
_vehicle setDir _vehicledir;
sleep 0.1;
// name vehicle globally
_vehicle SetVehicleVarName _vehName;
missionNameSpace setVariable [_vehName, _vehicle];
publicVariable _vehName;
// Process Additional Spawn functions
call {[_vehicle, _vehName, 1] call MHQ_VehicleInit};
// Respawn and init done!
_vehKilled = false;
};
};
i am not really sure :I Well whatever it seems not, since its not working ^ hope you can help me again Richard :/
-
I gave John some tasks to fullfill his script.
Why dont you use "BTC Revive" for your mobile HQ ? i am on it, but i got some problems atm, not knowing all your scripts wich may do problems to it.
ATM when i respawn i cant find any point to respawn, still can press the button, ending with just lying down where i died in dead position, cant move but throw grenades ^O^ö
-
but the version from LKincheloe is working for me without any problem ! *on his mod* so whats different ?
---------- Post added at 16:46 ---------- Previous post was at 15:28 ----------
Well ok i got it fixed now... somehow... think there was a missmatch in comands @vehicle. Or a spelling problem, not shure.
Now what you need to fix:
1. when prepare vehicle -> get in driver = prepare lost until car is destroyed.
2. When going out of mounted statics, often ends up glitching in the vehicle.
3. a better understanding/request where you can activate the action on the vehicle.
4. statics can be mounted from one vehicle to another *in mounted state* wich ends with the first vehicle removing itself no more static on itself bringing the static from the vehicle far away with the static, right behind the one without the static.
Also you can remove from both vehicles then :p its sorta glitchy and will bring bugusing in pvp thought.
5. we need to find a way to prevent statics from being dissassemble. For sure not if its mounted. this also leads to very bad glitches!!!!!!!
if thoose bad 5 are fixed, i thinks that would be nearly a stable realse time.
Thoose are big problems.
-
StaticMountV2.sqfloading with:
MT = [[this,"Prepair Truck For Weapon","StaticMount.sqf"],"addactionMP",nil,false] spawn BIS_fnc_MP;
thoose two differs...
still if i name it both the same, now i see the prepare action, but it wont do it if i klick. Then i see the "get mortar on truck..whatever" until the truck is destroyed.
-
can you show here all the folders/files and other things wich are needed to implement into another mission than resistance.
Thus i tried to implement into another mod, but the "prepare vehicle" option isnt showing up on the vehicle...
i found:
Truck_initV2
Truck_init
truck_mountweapon
i gave the vehicle the name and the script that was working in resistance.
is there anything else i need to do other than copy thoose files in the correct folder way ?
handle any id`s ?
handle the prepare dialog elsewhere than thoose folders ?
any other files that it is working with i missed ?
something else ?
-
i neither have much time :(
-
Well not solely depending on the server, yes the server has a big impact on client performance as well but you could be able to notice some improvements on the same server with this memory allocator compared to the original one.Is it needed to have both client and server dto run together for this improvements ?
-
we tested it with single on server loaded = nothing in fps changed. Then a mate with low hardware tested clientside = nothing in fps changed.
do i missing something ?
ahh i see in multiplayer its depending fully on server... ?
http://day0.com.au/forum/arma/638-arma-3-performance-tweaks-and-settings-guide
-
The main problem with the mobile marker is it's a home-brew script and thus most likely breaks when touched. I figured out something else to do instead of making broken scripts.sounds good mate! hope you find the solution an easy task.
I also saw that this despawn from eos markers my make problems. Sometimes when the troops spawn and u going off that zone for a while, there will be no units anymore and you arent beeing able to capture the zone anymore. For me it was the first Tower.
BTW. so you said nothing about me, want to help with your mission. So ?
-
i am looking for a way to completely disable unit despawn once spawned. and dont let anymore units spawn other than the units allready spawned.
=BTC= Revive
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Thanks Jman, that worked well ! i wrote u a pm btw ;)