Jump to content

[Tutorial] Clickable self-bloodbag with configurable limitations (Updated 02/21/2014)


adg

Recommended Posts

hello! first of all you are awsome, its a very good idea the clicable selfbb and all its customization.

my problem is that when i implement the code, building clicing options, dissapear (the greenbox with option appear, but empty, and nothing happens if i click) and im not able to do anything with the rightclic.

 

Im in dayz epoch 1.0.4.2 if anyone has idea of why thids happens, please gime me some instrucctions. thankyou!

 

(sorry for my english, im 5 year old XP no, im not english speaker)

 

You probably made an error in ui_selectSlot.sqf.

 

Try this one for 1.0.4.2: https://dl.dropboxusercontent.com/u/14937351/ui_selectSlot.sqf

 

 

//Edit fixed the file loc.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Wow, just tried this out and its incredible! Much better than Krixes!! I like the clickable option instead of the scroll wheel. Very well done!!!! ADG, You rock babe!

 

Glad you like it :)

Link to comment
Share on other sites

So I don't have a compiles.sqf in my mission folder.  I understand you want us to copy/paste it from the epoch code if we don't.  However, one of the mods I use (Extended build snapping) has two steps in its direction:  One is if you DO have a compiles.sqf file, the other one is if you DO NOT have the compiles.sqf.  At the time I didn't have a compiles.sqf, so I instead followed Step A for the installation of that mod.

 

If I add the compiles.sqf file for this mod, is there a chance it could negatively impact the other mod?  Perhaps I should be posting in the other mod thread about this, I'm not sure.  Just worried about a compatibility issue.

 

Edit:  Looks like it will call issues since I believe Build Snapping uses its own custom compiles.sqf if you don't already have one.  Probably just have to reinstall that mod using a new compiles.sqf that i create so i can use it with other mods like this.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks Survivor for the great Self Bloodbag!

 

Just want to add the following solution to the problem i encountered that stopped both Self Bloodbag and your Debug from working.

 

In the file <Your_Dayz_Folder>\MPMissions\<Your_Mission>\init.sqf

 

i had to change line 62

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";				//Compile regular functions

to

call compile preprocessFileLineNumbers "custom\compiles.sqf";				//Compile regular functions

That said I would also like to mention that i am setting this server up from scratch and your things are the first things I am adding so that could be the reason for me missing that line in my file.

 

Hope this info helps some other n00bs ;)

Link to comment
Share on other sites

Hey,  I really like this mod.

 

One variable I would like to see added is to make the transfusion take longer, a loop in the animation a few times before it works.  I suppose it would also need some way to be interrupted.  It would be very much appreciated!

Link to comment
Share on other sites

  • 3 weeks later...

Hi, which line I need to change / add in the code to enable slower action till self blood transusion is completed!

This is one of the things which by my opinion needs to be configurable...

 

For example I want to make that it takes 30 seconds till the action is completed....

Can you please help me?

 

Thx, Juris!

Link to comment
Share on other sites

So I got this working with 1 - 2 items but from what my RPT is saying it don't look like it will let me add multiple lines with the same item i.e toolbox or bloodbag, I tried mixing it up a bit and its still not having it I get wait for host. Is they anyway around this? or maybe I'm doing something wrong.

 

RPT

ErrorMessage: File mpmissions\__cur_mp.Chernarus\scripts\fixes\extra_rc.hpp, line 25: /ExtraRc.ItemToolbox: Member already defined.

extra_rc.hpp

class ExtraRc {
    class ItemBloodbag {
        class Use {
            text = "Use Bloodbag";
            script = "execVM 'scripts\selfBlood\player_selfbloodbag.sqf'";
        };
    };
    class ItemToolbox {
        class Use {
            text = "Deploy Bike";
            script = "execVM 'scripts\Deploy\deploy_bike.sqf'";
        };
    };
    class BAF_ied_v1 {
        class Use {
            text = "Craft LargeIED";
            script = "execVM 'scripts\Deploy\ied_large.sqf'";
        };
    };	
    class ItemToolbox {
        class Use {
            text = "Deploy LittleBird";
            script = "execVM 'scripts\Deploy\deploy_bird.sqf'";
        };
    };
    class HandGrenade_West {
        class Use {
            text = "Craft SmallIED";
            script = "execVM 'scripts\Deploy\ied_small.sqf'";
        };
    };	
    class ItemToolbox {
        class Use {
            text = "Deploy Motobike";
            script = "execVM 'scripts\Deploy\deploy_moto.sqf'";
        };
    };
    class ItemBloodbag {
        class Use {
            text = "Consume Bloodbag";
            script = "execVM 'scripts\selfBlood\player_consumeBloodbag.sqf'";
        };
    };
};
Link to comment
Share on other sites

with ref to this part - 

	// Add extra context menus
_erc_cfgActions = (missionConfigFile >> "ExtraRc" >> _item);
_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
};

I already have this in 

_erc_cfgActions = (missionConfigFile >> "WaTd" >> _item);
_erc_numActions = (count _erc_cfgActions);
if (isClass _erc_cfgActions) then {
    for "_j" from 0 to (_erc_numActions - 1) do 
    {
        _menu =  _parent displayCtrl (1600 + _j + _numActions);
        _menu ctrlShow true;
        _config =  (_erc_cfgActions select _j);
        _text =  getText (_config >> "text");
        _script =  getText (_config >> "script");
        _height = _height + (0.025 * safezoneH);
        uiNamespace setVariable ['uiControl', _control];
        _menu ctrlSetText _text;
        _menu ctrlSetEventHandler ["ButtonClick",_script];
    };
   };

How do i get it so both right click options are in ?

Link to comment
Share on other sites

Hey Folks, Looking for a bit of help with this script. Building a Panthera Epoch server. Currently this is a fresh server with only SelfBB as a mod.

I've created a custom folder and have added compiles.sqf and ui_selectSlot.sqf from my Epoch DayZ code folders. Created the extra_rc.hpp and SelfBB.sqf. I've edited each file following the instructions. Uploaded the PBO to the server (HFBServers).

 

When loading I get a black screen with the progress bar at 3/4ths and a count down timer in the right corner. Countdown ticks to 110 seconds then times out and dumps me back to the player logon screen. I can hear the oceans and the player walking in the background.

 

I've linked my compiled PBO to my skydrive. Looking for assistance. Thanks

 

https://onedrive.live.com/redir?resid=E13988BA8110BF31%21460

Link to comment
Share on other sites

class ExtraRc {
	class ItemToolbox {
		class BuildBike {
			text = "Deploy Bike";
			script = "['MMT_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'";
		};
	};	
		class BuildMotorcycle {
			text = "Deploy Motorcycle";
			script = "['TT650_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'";
		};
	};	
		class BuildMozzie {
			text = "Deploy Mozzie";
			script = "['CSJ_GyroC'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'";
		};
	};
};

Hello I am getting this error from my RPT file:

 

ErrorMessage: File mpmissions\_cur_mp.chernarus\Scripts\extra_rc.hpp, line 12: .ExtraRc: Member already defined.

 

I followed the instructions exactly but put everything in a Scripts folder instead of a Custom one. I have attached my hpp file to this post. PLEASE HELP!

Link to comment
Share on other sites

class ExtraRc {
	class ItemToolbox {
		class BuildBike {
			text = "Deploy Bike";
			script = "['MMT_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'";
		};
		class BuildMotorcycle {
			text = "Deploy Motorcycle";
			script = "['TT650_Civ'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'";
		};
		class BuildMozzie {
			text = "Deploy Mozzie";
			script = "['CSJ_GyroC'] execVM 'SCRIPT_PATH\EVD\EVD_deploy.sqf'";
		};
	};
};

Try it like that

Link to comment
Share on other sites

Thanks for the script!! great work!! works a charm!!

 

good clear coding, easily customisable, well structured, VERY easy tutorial to follow, and  great layout! 

 

Thank you for the script muchly appreciated!!!

 

Will definately reccomend to my friend who is also starting up his server!!!

 

One question though, does this script inter-fear with any others?

 

 

Thanks,

Ryan.

Link to comment
Share on other sites

have a small problem not sure how to solve it      i installed this script and deploy bike script seems they both use the     extra_rc.hpp  file

 

  class ExtraRc {

class ItemToolbox {
class Old_bike_TK_INS_EP1 {
            text = "Deploy Bike";
            script = "execVM 'bike.sqf'";
};
};
};
 
 
and ofc the bloodbag one would be 
 
class ExtraRc {
    class ItemBloodbag {
        class Use {
            text = "Use Bloodbag";
            script = "execVM 'custom\SelfBB.sqf'";
        };
    };
};
 
would i put both these codes in same file if so how.    or is there another way around this cheers    (bike script i was adding  http://www.dayzpatriots.com/deploy-bike-add-right-click-option-to-items-t290.html)
Link to comment
Share on other sites

 

have a small problem not sure how to solve it      i installed this script and deploy bike script seems they both use the     extra_rc.hpp  file

use this:

class ExtraRc {
      class ItemToolbox {
            class Old_bike_TK_INS_EP1 {
            text = "Deploy Bike";
            script = "execVM 'bike.sqf'";
            };
      };
      class ItemBloodbag {
            class Use {
            text = "Use Bloodbag";
            script = "execVM 'custom\SelfBB.sqf'";
            };
      };
};
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
×
×
  • Create New...