Krixes - Self Bloodbag Script

So, I started from scratch. The only mod I have installed now is this Bloodbag script. I get the scroll wheel selection for Bloodbag, but when I click it, nothing.
Really frustrating since I had it working yesterday!
 
So I should Edit that fn_selfActions.sqf and add the lines that is on Krixes?

Yes you'll need to add the bit for bloodbag still. :p

So, I started from scratch. The only mod I have installed now is this Bloodbag script. I get the scroll wheel selection for Bloodbag, but when I click it, nothing.
Really frustrating since I had it working yesterday!


Usually if it does nothing, it's either a path problem, or an outdated selfbloodbag.sqf with the old combat check in it. Mind uploading your mission file somewhere so I can take a quick look?
 
Actually, now that you mentioned it... I was testing things out, and tried bloodbagging while I was in combat, and it didn't give me the message that I couldn't bloodbag while in combat.

Thanks so much for your help my friend!
 
Yup, just tested it out.
Bloodbag working fine, Custom Debug Monitor w/toggle working fine, scroll wheel selecting working fine. 1,2,3 weapon selecting working fine. Even have spawn select working now!
Can't thank you enough!
 
HI Guys
can you help me since applying the bloodbag script, which works, the Traders Menu items, just stays on loading?
so I checked my init.sqf and I had the
call compile "Scripts\Compiles" line above 1.0 as instructed, but that was in between my "Server_traders.sqf " line and the 1.0 line, so I removed it but still no change? Any Ideas??
im on Epoch 1.0.2.4, chrz
 
HI Guys
can you help me since applying the bloodbag script, which works, the Traders Menu items, just stays on loading?
so I checked my init.sqf and I had the
call compile "Scripts\Compiles" line above 1.0 as instructed, but that was in between my "Server_traders.sqf " line and the 1.0 line, so I removed it but still no change? Any Ideas??
im on Epoch 1.0.2.4, chrz

You used the fn_selfActions.sqf from Krixes' post I'm guessing? You're not supposed to do that. What you need to do is open your local install of Arma and find this
@DayZ_Epoch\addons\dayz_code.pbo\compile\fn_selfActions.sqf
Copy that file to where you have put Krixes' file in your mission folder then open it up and find
Code:
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);

Then directly under that you want to add
Code:
// ---------------------------------------Krixes Self Bloodbag Start------------------------------------
    _mags = magazines player;
 
    // 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;
    };
// ---------------------------------------Krixes Self Bloodbag End------------------------------------


Save and you're done.
 
hey rosska, wow spooky I was just reading that very thread, making sure I have done everything correct, sadly though I took a copy of fn_selfactions out of my dayz_code.pbo and used that.... but I also left the original in the .pbo?? would that be the prob?
 
yup I double checked and I did use mine, as the coding is different...below

scriptName "Functions\misc\fn_selfActions.sqf";
/***********************************************************
ADD ACTIONS FOR SELF
- Function
- [] call fnc_usec_selfActions;
************************************************************/
private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE"];
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
_vehicle = vehicle player;
_isPZombie = player isKindOf "PZombie_VB";
_inVehicle = (_vehicle != player);
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
// ---------------------------------------Krixes Self Bloodbag Start------------------------------------
_mags = magazines player;

// Krixes Self Bloodbag
 
You don't have to delete the .pbo version. In fact you definitely should not do that haha.
If you upload your mission files I can take a look at them for you.
 
Ok, in init.sqf you have this line too low down
Code:
call compile preprocessFileLineNumbers "Scripts\compiles.sqf"; //Compile custom compiles

It needs to go directly above this line
Code:
progressLoadingScreen 1.0;

Also, you don't actually have a scripts folder in there with the compiles.sqf, fn_selfActions.sqf, or player_selfbloodbag.sqf...
 
I did have it there originally, I moved it about, because of the problem with the traders, I also just updated my link with the scripts folder
 
Even if the option still shows, the placement is important because it determines load order. This file should be loaded before the game finishes loading the mission on the load screen. :)

The links above are still downloading the same mission file (without the scripts folder) so I'm not sure if it's in the right place or not. The paths all seem ok if the Scripts folder is inside your mission file.
 
Ok, that all looks fine, save for the line in the init.sqf.
The only thing I would suggest, is possibly put the call for the custom compiles.sqf directly above the server_traders.sqf call. Other than that though I can't see a reason why that wouldn't work as intended.
 
Back
Top