Krixes - Self Bloodbag Script

Hi, I wanted to add this into my existing basebuilding 1.2 fn_selfactions.sqf but i stumble accross this, can you point me in right direction on how i go about implementing it in there?

Code:
// Check mags in player inventory to show build recipe menu 
    _mags = magazines player;
    if ("ItemTankTrap" in _mags || "ItemSandbag" in _mags || "ItemWire" in _mags || "PartWoodPile" in _mags || "PartGeneric" in _mags) then {
        hasBuildItem = true;
    } else { hasBuildItem = false;};
    //Build Recipe Menu Action
    if((speed player <= 1) && hasBuildItem && _canDo) then {
        if (s_player_recipeMenu < 0) then {
            s_player_recipeMenu = player addaction [("<t color=""#0074E8"">" + ("Build Recipes") +"</t>"),"buildRecipeBook\build_recipe_dialog.sqf","",5,false,true,"",""];
        };
    } else {
        player removeAction s_player_recipeMenu;
        s_player_recipeMenu = -1;
    };
Add my fn_selfActions code somewhere below there and and remove the _mags = magazines player from my code. So long as its not defined twice and is defined before my code somewhere it will work just the same.
 
So i do not add the bagblood into the if statements but just add your if statements below the "if((speed player etc..ect.."

Shame it can't handle OR though :(
 
Allright now i have added it like this:

Code:
_mags = magazines player;
    if ("ItemTankTrap" in _mags || "ItemSandbag" in _mags || "ItemWire" in _mags || "PartWoodPile" in _mags || "PartGeneric" in _mags) then {
        hasBuildItem = true;
    } else { hasBuildItem = false;};
    //Build Recipe Menu Action
    if((speed player <= 1) && hasBuildItem && _canDo) then {
        if (s_player_recipeMenu < 0) then {
            s_player_recipeMenu = player addaction [("<t color=""#0074E8"">" + ("Build Recipes") +"</t>"),"buildRecipeBook\build_recipe_dialog.sqf","",5,false,true,"",""];
        };
    } else {
        player removeAction s_player_recipeMenu;
        s_player_recipeMenu = -1;
    };
    // Krixes Self Bloodbag
    if ("ItemBloodbag" in _mags) then {
        hasBagItem = true;
    } else { hasBagItem = false;};
    if((speed player <= 1) && hasBagItem && _canDo) then {
        if (s_player_selfBloodbag < 0) then {
            s_player_selfBloodbag = player addaction[("<t color=""#c70000"">" + ("Self Bloodbag") +"</t>"),"custom\player_selfbloodbag.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_selfBloodbag;
        s_player_selfBloodbag = -1;
    };

BUT..... as it says ""custom\player_selfbloodbag.sqf" I have created the custom in my mission folder but the fn_SelfActions.sqf is in "chernarus/dayz_code/compile" do i need to change the cutom setting to something else then or just add the custom folder into the same compile folder?
 
Allright now i have added it like this:

BUT..... as it says ""custom\player_selfbloodbag.sqf" I have created the custom in my mission folder but the fn_SelfActions.sqf is in "chernarus/dayz_code/compile" do i need to change the cutom setting to something else then or just add the custom folder into the same compile folder?
The way you have added it to fn_selfActions.sqf is correct.

You don't need my custom compiles.sqf if you already have one pointing to a custom fn_selfActions.sqf like you do in basebuilding.

Only thing left to do is add in "custom" folder my player_selfbloodbag.sqf and you should be good to go. :)

If something doesn't work out you may show me your .pbo via private message or right here, it's up to you.
 
It's working like a charm, one thing though, when the blood drop shows no more blood in it (helicrash) and you do the bloodbag thing, it looks like the blood gets added yet the drop stays transparent untill you relog the game.

P.S. I do not have the pbo, one of the advantages on this host, it's all unpacked into the mission
 
@Krixes

Hi, Great script mate,
I have installed it onto my Reality server but it fails to work, I read through some of the thread and found one person who runs epoch has a similar file system to mine so I tried to find a player stats line so I have attempted to place it in a couple of other places but cannot seem to get it to work. The map is Ovaron. Any ideas
 
@Krixes

Hi, Great script mate,
I have installed it onto my Reality server but it fails to work, I read through some of the thread and found one person who runs epoch has a similar file system to mine so I tried to find a player stats line so I have attempted to place it in a couple of other places but cannot seem to get it to work. The map is Ovaron. Any ideas

Hey Stealth - I'm also running Epoch (Lingor) and can't get it to work....option doesn't display on the menu. You experiencing the same?
 
Hey Stealth - I'm also running Epoch (Lingor) and can't get it to work....option doesn't display on the menu. You experiencing the same?
Hey Fr1nk,

Just got mine sorted, I am not running epoch but the file system is worked in the same manner, all I ended up doing was following the instructions on the first page as if I had no other mod's installed, then with a cross of my fingers went in, dropped the blood bag on the ground, picked it back up and now it seems to be working, so far none of me other mod's have been found to be affected.
My advice is wether you have mods already installed or not try both Krixes methods.

@Krixes.
DayZ Ovaron, (Reality) - Confirmed Working
 
Hey Fr1nk,

Just got mine sorted, I am not running epoch but the file system is worked in the same manner, all I ended up doing was following the instructions on the first page as if I had no other mod's installed, then with a cross of my fingers went in, dropped the blood bag on the ground, picked it back up and now it seems to be working, so far none of me other mod's have been found to be affected.
My advice is wether you have mods already installed or not try both Krixes methods.

@Krixes.
DayZ Ovaron, (Reality) - Confirmed Working
Im glad you got it working bud! :)

Hey Stealth - I'm also running Epoch (Lingor) and can't get it to work....option doesn't display on the menu. You experiencing the same?
Fr1nk I sent you another message.;)
 
Sorry but new to this, when you say the dayz_mission.pbo...Where exactly is that located? I have searched my server and found nothing labeled as such. Thanks Krixes.

Krixes, shoot me a message if you can :)
 
Sorry but new to this, when you say the dayz_mission.pbo...Where exactly is that located? I have searched my server and found nothing labeled as such. Thanks Krixes.

Krixes, shoot me a message if you can :)

Hi mate,

depends on which hoster you're working with. On dayz.st its just a click above the Restart button.
 
Using DayzPriv. Hope that helps.

Ive found the init.sqf and the other files, followed the directions but still doesn't seem to work for the members. My ADMINS can do it but the regular players cannot.
 
Regarding the mission.pbo - I googled and everything i read is that you have access to your mission.pbo on dayzpriv. Look for it in the control panel.
 
anyone see a problem with this? i just copied and pasted. think ive done it right. doesnt seem to work tho..

init file
Code:
// Load in the settings compiles:
call compile preprocessFileLineNumbers "\kh\dayztaviana\settingsinit\kh_compiles.sqf";
 
diag_log "Started executing user settings file.";
call compile preprocessFileLineNumbers "settings.sqf";
diag_log "Finished executing user settings file.";
 
call compile preprocessFileLineNumbers "custom\compiles.sqf"; //Compile custom compiles
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;
 
// (Taviana) Don't call the regular compile:

then i created a folder called custom just in the same folder it puts you into when you unpack the pbo. Copied a sgf file then put it in the custom folder and renamed the correct name and edited it with notepad++ and deleted all the text then just pasted this into the first line
Code:
fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf";            // fnc_usec_selfActions - adds custom actions to dayz code

then i placed the two files attached to origonal post in the custom folder. then just packed and uploaded.

anyone see anything? DO I NEED TO BE HITTING ENTER TO SPACE THE LINES OUT?

thanks
 
anyone see a problem with this? i just copied and pasted. think ive done it right. doesnt seem to work tho..

anyone see anything? DO I NEED TO BE HITTING ENTER TO SPACE THE LINES OUT?

thanks
The problem I see right away is that you are calling the compiles.sqf to early it needs to be further down just before progressLoadingScreen 1.0;

Also are you using the fn_selfActions.sqf extracted from the DayZ Taviana folder or the one provided with the script?

Taviana needs to use the fn_selfActions.sqf from the DayZ Tavianan dayz_code.pbo! :)
 
Thanks for quick reply. Yeah I just used the one that was attached to the first post in this thread.
Im guessing the sqf file is somewhere in the dayz_mission pbo? Or it in the map files itself?

Further down? So on the same line as progress loadingscreen1? Its the line above it at the moment. I guessed that's what you meant as before:)

Or am I putting it in the total wrong place. Could you quickly edit the init file script I posted?

Sorry if im being confusing. Thanks so much for your help.

Im with dayz.st if that helps.
 
Thanks for quick reply. Yeah I just used the one that was attached to the first post in this thread.
Im guessing the sqf file is somewhere in the dayz_mission pbo? Or it in the map files itself?

Further down? So on the same line as progress loadingscreen1? Its the line above it at the moment. I guessed that's what you meant as before:)

Or am I putting it in the total wrong place. Could you quickly edit the init file script I posted?

Sorry if im being confusing. Thanks so much for your help.

Im with dayz.st if that helps.
Can you send me your entire init.sqf or better yet your mission pbo?
 
I'll be able to send you full mission pho after I Finnish work. I'll have it to you around 6pm GMT. That okay?

Thanks so much again matey! Not very often you come across someone so helpful and fast. Cheers.
 
Back
Top