Jump to content
Sign in to follow this  
sprocker

Help! Arigatou`s jump script doesn't work in multiplayer!

Recommended Posts

Hi!

I use Arigatou`s jump script in my mision file in multiplayer

And this not working :(

I write in init.sqf line

 if (isServer) then { call compile preprocessFileLineNumbers "jumper.sqf";}; 

And with this script playing once at start mission.

Please, help me make this working!


player setvariable ["ARGT_JUMP_POWER", 5.5, true];
player setvariable ["ARGT_JUMP_READY", true, true];

ARGT_JUMP =
{
 private ["_moves", "_state", "_velocity", "_power", "_speed"];
 if ( ! (player getvariable "ARGT_JUMP_READY") || vehicle player != player ) exitwith {true};
 _moves = configfile >> gettext ( configfile >> "CfgVehicles" >> typeof player >> "moves" );
 _state = getnumber (_moves >> "Actions" >> gettext ( _moves >> "States" >> animationstate player >> "actions" ) >> "upDegree");
 if ( _state in [1,2,3,4,5,6,7,11,13,14] ) exitwith {true};
 _power = (1 - (damage player)) * (player getvariable "ARGT_JUMP_POWER");
 _speed = _power / 2;
 _velocity = velocity player;
 /*player setvariable ["ARGT_JUMP_WEAPON", currentweapon player, true];
 player selectweapon primaryweapon player;*/
 player switchmove "ActsPercMrunSlowWrflDf_FlipFlopPara";
 player setvariable ["ARGT_JUMP_READY", false, true];
 player setvelocity [(_velocity select 0) + _speed * sin getdir player,
                     (_velocity select 1) + _speed * cos getdir player,
                     (_velocity select 2) + _power];
 true
};

player addeventhandler ["AnimDone",
{
 private ["_unit"];
 _unit = _this select 0;
 if ( ! (_unit getvariable "ARGT_JUMP_READY") ) then {_unit setvariable ["ARGT_JUMP_READY", true, true]};
}];

ARGT_KEYDOWN =
{
 private ["_dikcode"];
 _dikcode = _this select 1;
 switch ( true ) do
 {
   case ( _dikcode == 0x39 ) : {call ARGT_JUMP}; // DIK_SPACE
   default {false};
 };    
};

while { true } do
{
 waituntil { ! isnull finddisplay 46 };
 finddisplay 46 displayaddeventhandler ["KeyDown", "_this call ARGT_KEYDOWN"];
 waituntil { isnull finddisplay 46 };
};

Edited by sprocker

Share this post


Link to post
Share on other sites

The command switchmove has only local effect.

You need to replace the line

player switchmove "ActsPercMrunSlowWrflDf_FlipFlopPara";

by

[objNull, player, rSWITCHMOVE, "ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;

And you need to place a functions module on the map.

The script is activated by

0 = execvm "jump.sqf";

in the init.sqs/f or in the activation line of a trigger with the condition true

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

Senx, RogueTrooper!!! :)

But!

I have two more missions:

in first this method perfectly working.

in second - do not.

May be what secon mission from DayZ mod =\

\\ THIS IS INIT.SQF CODE

startLoadingScreen ["","DayZ_loadingScreen"];
enableSaving [false, false];


//REALLY IMPORTANT VALUES
dayZ_hivePipe1 = 	"\\.\pipe\dayz";	//The named pipe
dayZ_instance =	222;					//The instance
hiveInUse	=	true;
dayzHiveRequest = [];
initialized = false;
dayz_previousID = 0;

//Load in compiled functions
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";				//Initilize the Variables (IMPORTANT: Must happen very early)

progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";				//Initilize the publicVariable event handlers
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";	//Functions used by CLIENT for medical
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";				//Compile regular functions
progressLoadingScreen 1.0;

"filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";

if ((!isServer) && (isNull player) ) then
{
waitUntil {!isNull player};
waitUntil {time > 3};
};

if ((!isServer) && (player != player)) then
{
 waitUntil {player == player};
 waitUntil {time > 3};
};

// reassign functions
// call compile preprocessFileLineNumbers "fixes\_fixes.sqf";
// damage eventhanling
set_obj_dmg = compile preprocessFileLineNumbers "fixes\set_obj_dmg.sqf";
fnc_vehicleEventHandler = compile preprocessFileLineNumbers "fixes\vehicle_init.sqf";
// action hooks
player_build = compile preprocessFileLineNumbers "fixes\player_build.sqf";
player_drink = compile preprocessFileLineNumbers "fixes\player_drink.sqf";
player_eat = compile preprocessFileLineNumbers "fixes\player_eat.sqf";
player_useMeds = compile preprocessFileLineNumbers "fixes\player_useMeds.sqf";
player_wearClothes = compile preprocessFileLineNumbers "fixes\player_wearClothes.sqf";
player_tentPitch = compile preprocessFileLineNumbers "fixes\tent_pitch.sqf";
player_fillWater = compile preprocessFileLineNumbers "fixes\water_fill.sqf";
player_switchModel = compile preprocessFileLineNumbers "fixes\player_switchModel.sqf";
// other hooks
player_gearSync = compile preprocessFileLineNumbers "fixes\player_gearSync.sqf";
player_humanityMorph = compile preprocessFileLineNumbers "fixes\player_humanityMorph.sqf";
player_updateGui = compile preprocessFileLineNumbers "fixes\player_updateGui.sqf";
// count player magazines
player_countmagazines = compile preprocessFileLineNumbers "fixes\player_countmagazines.sqf";
// original function
player_build_orig 	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf";
player_drink_orig 	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf";
player_eat_orig		= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_eat.sqf";
player_useMeds_orig	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_useMeds.sqf";
player_wearClothes_orig	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf";
player_tentPitch_orig	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf";
player_fillWater_orig 	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\water_fill.sqf";
player_gearSync_orig 	= compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSync.sqf";
// player_reloadMag 	= compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf";
//call compile preprocessFileLineNumbers "jumper.sqf";


if (isServer) then {
//Run the server monitor
//_id = ["Volha_1_TK_CIV_EP1",getMarkerPos "carloc",0] spawn object_spawnDamVehicle;
hiveInUse	=	true;
_serverMonitor = 	[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";

};


if (!isDedicated) then {
//Conduct map operations
0 fadeSound 0;
0 cutText [(localize "STR_AUTHENTICATING"), "BLACK FADED",60];


//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";	


// 	need wait for creation all vehicles, when first player join.
waituntil{_cnt=count allMissionObjects "UH1Wreck_DZ";_cnt==5};
_heliCrash = allmissionobjects "UH1Wreck_DZ";
{
  dayzFire = [_x,2,0,false,false];
  nul=dayzFire spawn BIS_Effects_Burn;
//	  diag_log format["DEBUG: %1 [%2]",typeOf _x,mapGridPosition (position _x)];
} forEach _heliCrash;

{
//	set EH for every player
 _x call fnc_vehicleEventHandler;;
} forEach vehicles;
};
[b]execvm "jump.sqf";[/b]

I activated script by this way, but it don`t working.

Any advices? :)

Share this post


Link to post
Share on other sites

Senx, RogueTrooper!))

I have two more mission and this method perfectly working in first mission

But in second mission this dont working...

May be what second mission from DayZ =/

any questions?

Share this post


Link to post
Share on other sites

Questions about DayZ should be asked in the DayZ forums. Further, personally I haven't got the faintest clue about DayZ scripting stuff.

Share this post


Link to post
Share on other sites

I dont get it to work on my mp server. i have a server at gamed!de.

I replaced the line wtih [objNull, player, rSWITCHMOVE, "ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;

And i wrote the execVM command in the init.sqf file. I also tried a trigger but i don't get it to work.

The only thing i can do is to execute this script global with a ingame console. But this is no solution. Can anyone help me please?

Share this post


Link to post
Share on other sites

You're only running it on the server.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×