Jump to content
  • 0

Quick help? - Modifying a script


FPSsean

Question

Hi Guys,

 

I must be dumb I've looked over how to modify this script for hours with no luck.

 

https://github.com/mudzereli/DayZEpochDeployableBike

 

When deploying a bike, it has steps in game after you deploy and if you try and jump on the bike while it's doing those steps you get teleported out to sea.

 

I'm trying to work out how to either remove the mount option to get on the bike until it's finished deploying or make the ingame animation just 1 step and not 3.

 

Anyone have any ideas?

 

Cheers

Sean

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

This happens because bike is first created in debug and then attached to player, it reuses old player_build script. Interesting idea, but not without flaws.

Easiest fix would be increasing distance from bike and player by a meter or so... making action inaccessible.

 

edit:

Ok, there's a config file for offsets. Just increase second element for toolbox/bike, it contains offset in meters

 

example to spawn bike 3m away from player (up from 2m)

["ItemToolbox",[0,3,1],5,0.1,false,false,false,false,false,true,true,["MMT_Civ"],[],["ItemToolbox"],"true"],
Edited by raymix
Link to comment
Share on other sites

  • 0

I have mine set to a much larger distance. 7 meters

["ItemToolbox",[0,7,1],5,0.9,false,false,false,false,false,true,true,["MMT_USMC"],[],["ItemToolbox"],"true"],

Anything less and you can rotate the bike and still get the option to get on before it is already deployed.

Link to comment
Share on other sites

  • 0

If you want to affect everything built including bases and  deployables then add this to your init.sqf:

DZE_StaticConstructionCount = 1;
If you only want to affect deployables, then edit line #466 and set limit to 1, but DO NOT add previous code to init.sqf (important).

Thank you so very much Raymix and Syco.

Really appreciate the assistance, I'll pop it in and have a look

Link to comment
Share on other sites

  • 0

I take that back it is one step but would be nice to chop that time in half.

ahh, I believe that's controled by animation state. So you either remove it or use different animation that is faster.

 

It all starts on line #484 playing animation "medic". This animation state is used to control r_doLoop loop down below. It halts the script with this loop and waits for animation to be finished before allowing you to proceed with the rest of the script.

If you don't want instant build, then you can chop building time in "half" or more by using any other animation that is shorter by simply replacing both lines that contains "medic" in them. For instant build, just get rid off animations and either remove loop or remove _isMedic IF statement leaving behind _started = true;... either way works

Link to comment
Share on other sites

  • 0

Guys thank you so much for the assistance, given you're all quite knolwedgeable I wonder if anyone can shed some light on 3 x errors I see repeatable in my RPT files?

 

 

15:08:34 Error in expression < getVariable["actionSet", false];

 
if (!_actionSet) then {
s_player_holderPickup>
15:08:34   Error position: <_actionSet) then {
s_player_holderPickup>
15:08:34   Error Undefined variable in expression: _actionset
15:08:34 File z\addons\dayz_code\init\object_BackpackAction.sqf, line 13
15:08:40 Error in expression < getVariable["actionSet", false];
 
if (!_actionSet) then {
s_player_holderPickup>
15:08:40   Error position: <_actionSet) then {
s_player_holderPickup>
15:08:40   Error Undefined variable in expression: _actionset
15:08:40 File z\addons\dayz_code\init\object_BackpackAction.sqf, line 13
 

 

 

15:05:58 Error in expression <.8145];

};
 
_vehicle_988 = objNull;
if (CS_addSafeZones) then
{
_this = createVe>
15:05:58   Error position: <CS_addSafeZones) then
{
_this = createVe>
15:05:58   Error Undefined variable in expression: cs_addsafezones
15:05:58 File z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf, line 3537
15:05:59 "[AGN] Starting Trader City Safezone Commander!"

 

 

15:10:32 Warning Message: File z\addons\dayz_server\system\server_cleanup.fsm, line 239: Config: '"' expected after if (DZE_DiagFpsFast) then {

call dze_diag_fps;
};
 
[] spawn server_spawnCleanLoot;
 
// set player save time based on server performance diag_tickTime;
_lastCleanupGroups = diag_tickTime;
_lastCleanupNull = diag_tickTime;
 
_lastCleanup900 = diag_tickTime;
 
 
15:10:32 File z\addons\dayz_server\system\server_cleanup.fsm, line 241: '/FSM/States/cleanup_loot.init': Missing ';' at the end of line
15:10:32 Error context *%FSM</STATEINIT""">*/;
15:10:32 Warning Message: File z\addons\dayz_server\system\server_cleanup.fsm, line 241: '/FSM/States/cleanup_loot.': '/' encountered instead of '='
15:10:32 Warning Message: Config : some input after EndOfFile.

 

 

Has anyone had any experience with those?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...