Jump to content

[release] 1.0.5.1 - Safe Suicide 1.2.2 - Kill yourself in style.


Recommended Posts

SUICIDE 1.2.2

 

Out of the box, this script adds a right click action to most pistols in the game that allows you to commit suicide.

It's configurable, triggered from right click instead of scroll menu, and it plays randomly one of 2 animations

 

For some samples of what it does, check out this gallery on imgur:

 

Features:

  • fully configurable
  • right click so no accidental suicides
  • cancel suicide by moving/etc
  • better visual/audio cues

Installation

  1. download the files
  2. extract the addons and overwrites folder from the downloaded zip file into your mission file root
  3. add this line to the end of your mission file init.sqf.
    • call compile preprocessFileLineNumbers "addons\suicide\init.sqf";
  4. edit addons\suicide\config.sqf to configure some options such as what guns it works with etc.

Change Log

version|change
-------|-------
1.2.2  | better click actions build conflict detection
1.2.1  | update for compatibility w/ new click actions build
1.2.0  | now you can suicide without having the handgun equipped. option to enable or disable actual weapon use (selection / firing)
1.1.0  | better message handling when cancel time is 0 (instant suicide) / change default cancel time to 0
1.0.0  | release
Link to comment
Share on other sites

Hello,

I have your bike/suicide script working well  :)

Just wondering how would I link the Rangefinder/Binocular set view distance addon, and a couple of additional scripts like Harvest Hemp?

I was using this and had everything running smooth:

 

if(!isDedicated) then {
    // elitist array adding method
    DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["30m_plot_kit","Click Me","hint ""I'm a plot!"";"]];
    // also acceptable
    DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["30m_plot_kit","Click Me too!","hint ""I'm a plot also!"";"]];
    // should work for scripts etc as well of course
    DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["ItemBloodbag","Self Bloodbag lol","execVM 'path\to\my\script.sqf';"]];

 

};

 

I guess I'm just wondering where best to place this block of code to add my other RC options to it.

Thank you for your time and effort  :) 

STENCH

Link to comment
Share on other sites

Hello,

I have your bike/suicide script working well  :)

Just wondering how would I link the Rangefinder/Binocular set view distance addon, and a couple of additional scripts like Harvest Hemp?

I was using this and had everything running smooth:

 

if(!isDedicated) then {

    // elitist array adding method

    DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["30m_plot_kit","Click Me","hint ""I'm a plot!"";"]];

    // also acceptable

    DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["30m_plot_kit","Click Me too!","hint ""I'm a plot also!"";"]];

    // should work for scripts etc as well of course

    DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["ItemBloodbag","Self Bloodbag lol","execVM 'path\to\my\script.sqf';"]];

 

};

 

I guess I'm just wondering where best to place this block of code to add my other RC options to it.

Thank you for your time and effort  :) 

STENCH

this method should still work fine as long as it's in the init.sqf after either the bike or addons.

 

if you want to be extra fancy and not add/error out if the action handler isn't loaded see this code here:

if (!isDedicated) then {
     if(!(isNil "DZE_CLICK_ACTIONS_BUILD")) then {
         DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["Binocular","Set View Distance","execVM 'path\to\viewdistance\script.sqf';"]];
         DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["Binocular_Vector","Set View Distance","execVM 'path\to\viewdistance\script.sqf';"]];
         DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["ItemKnife","Harvest Hemp","execVM 'path\to\hemp\harvest\script.sqf';"]];
    } else {
        diag_log text "ERROR -- Click Actions Handler missing!";
    };
};
Link to comment
Share on other sites

This is what I had in my overwrites/click_actions/init.sqf:

 

// this baby only runs client side
if(isServer) exitWith {};
diag_log text "CLICK ACTIONS: loading...";
// our fancy array of registered actions
DZE_CLICK_ACTIONS = [];
// overwrite the selectslot function with our hooked version
player_selectSlot = compile preprocessFileLineNumbers "overwrites\click_actions\ui_selectSlot.sqf";
 
if(!isDedicated) then {
    // elitist array adding method
    DZE_CLICK_ACTIONS set [count DZE_CLICK_ACTIONS,["30m_plot_kit","Click Me","hint ""I'm a plot!"";"]];
    // also acceptable
    DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["30m_plot_kit","Click Me too!","hint ""I'm a plot also!"";"]];
    // should work for scripts etc as well of course
    DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["glock17_EP1","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["M9","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["M9SD","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Makarov","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["revolver_EP1","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["UZI_EP1","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Sa61_EP1","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Colt1911","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["UZI_SD_EP1","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["revolver_gold_EP1","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["MakarovSD","Commit Suicide","execVM 'custom\suicide.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["ItemMachete","Harvest Hemp","execVM 'custom\hemp.sqf';"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","View Distance:","systemChat('Change View Distance Locally. Click on one of the distance options');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","400 Meters","setViewDistance 400; systemChat('ViewDistance: 400'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","600 Meters","setViewDistance 600; systemChat('ViewDistance: 600'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","800 Meters","setViewDistance 800; systemChat('ViewDistance: 800'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","1000 Meters","setViewDistance 1000; systemChat('ViewDistance: 1000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","1250 Meters","setViewDistance 1250; systemChat('ViewDistance: 1250'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","1500 Meters","setViewDistance 1500; systemChat('ViewDistance: 1500'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","1750 Meters","setViewDistance 1750; systemChat('ViewDistance: 1750'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","2000 Meters","setViewDistance 2000; systemChat('ViewDistance: 2000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","3000 Meters","setViewDistance 3000; systemChat('ViewDistance: 3000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","4000 Meters","setViewDistance 4000; systemChat('ViewDistance: 4000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular_Vector","5000 Meters","setViewDistance 5000; systemChat('ViewDistance: 5000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","View Distance:","systemChat('Change View Distance Locally. Click on one of the distance options');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","400 Meters","setViewDistance 400; systemChat('ViewDistance: 400'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","600 Meters","setViewDistance 600; systemChat('ViewDistance: 600'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","800 Meters","setViewDistance 800; systemChat('ViewDistance: 800'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","1000 Meters","setViewDistance 1000; systemChat('ViewDistance: 1000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","1250 Meters","setViewDistance 1250; systemChat('ViewDistance: 1250'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","1500 Meters","setViewDistance 1500; systemChat('ViewDistance: 1500'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","1750 Meters","setViewDistance 1750; systemChat('ViewDistance: 1750'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","2000 Meters","setViewDistance 2000; systemChat('ViewDistance: 2000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","3000 Meters","setViewDistance 3000; systemChat('ViewDistance: 3000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","4000 Meters","setViewDistance 4000; systemChat('ViewDistance: 4000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["Binocular","5000 Meters","setViewDistance 5000; systemChat('ViewDistance: 5000'); systemChat('Warning: Higher the view distance Lower the FPS');"]];
};
 
And it worked perfectly
Link to comment
Share on other sites

Hello, Could you maybe give me some advice on how to run both your deploy bike and suicide scripts together?

just paste the line for each in your mission's init.sqf. they both use the same selectslot overwrite and self-load into it so no worries about conflicts, just make sure you grab the most recent version of both

Link to comment
Share on other sites

Well currently if you even look around (not move) it cancels. Like when you look left/right/up/down it cancels and this gets quite annoying.

 

try re-downloading 1.2.0 and installing it again. It should give you a leash of 1 meter to move. The old version worked like you are describing.

Link to comment
Share on other sites

How about instead of using a pistol to blow your brains out, you use a bazooka to do it. Now that's what I'd call style.

 

I thought this may be possible, as I wrote the script to support any weapon.

 

I tried it with MAAWS and the character performs the entire sequence with no weapon. so it looks like you are killing yourself with your finger, lol.

Link to comment
Share on other sites

I thought this may be possible, as I wrote the script to support any weapon.

 

I tried it with MAAWS and the character performs the entire sequence with no weapon. so it looks like you are killing yourself with your finger, lol.

LOL I'm impressed you tried, too bad it didn't work.

Link to comment
Share on other sites

Hi, nice script, works well. I just need to add the rest of the guns to it. I have a question for ya though. Could this script affect crafting stuff like turning gold ore into bars & such? One of my users was trying to make some scrap metal from iron ore and asked how long it takes because he said it was taking forever. I then tried to craft a gold bar and it just sits there doing the animation over and over and nothing happens. I let it go for 5 minutes and still no gold bar. I'm not sure if this script is the cause or not since I never tried crafting anything before installing this script. I have nothing else that uses the right click feature other than the vanilla Epoch stuff. Any ideas?

Link to comment
Share on other sites

This may be useful for anyone running an Overpoch server, I've updated the weapons array to include the Overwatch handguns.

DZE_SUICIDE_WEAPONS = ["M9","M9SD","Makarov","MakarovSD","Sa61_EP1","UZI_EP1","UZI_SD_EP1","revolver_EP1","revolver_gold_EP1","glock17_EP1","Colt1911","RH_m9c","RH_m93r","RH_m9sd","RH_m9csd","RH_browninghp","vil_B_HP","RH_anac","RH_anacg","RH_python","RH_deagle","RH_deagleg","RH_deaglem","RH_deaglemzb","RH_deaglemz","RH_deagles","vil_Glock","RH_g17","vil_Glock_o","RH_g17sd","RH_g18","RH_g19","RH_g19t","vil_MP5_EOTech","vil_MP5SD_EOTech","RH_tec9","RH_m1911","RH_m1911sd","RH_m1911old"," vil_uzimini","vil_uzimini_SD","RH_mk22","RH_mk22sd","RH_mk22v","RH_mk22vsd","RH_p38","RH_ppk","RH_mk2","RH_p226","RH_p226s","RH_bull","RH_tt33","RH_usp","RH_uspm","RH_uspd","vil_USP45","vil_USP45SD","vil_USP","vil_USPSD","vil_uzi","vil_uzi_c","vil_uzi_sd","RH_vz61"];

Link to comment
Share on other sites

 

This may be useful for anyone running an Overpoch server, I've updated the weapons array to include the Overwatch handguns.

DZE_SUICIDE_WEAPONS = ["M9","M9SD","Makarov","MakarovSD","Sa61_EP1","UZI_EP1","UZI_SD_EP1","revolver_EP1","revolver_gold_EP1","glock17_EP1","Colt1911","RH_m9c","RH_m93r","RH_m9sd","RH_m9csd","RH_browninghp","vil_B_HP","RH_anac","RH_anacg","RH_python","RH_deagle","RH_deagleg","RH_deaglem","RH_deaglemzb","RH_deaglemz","RH_deagles","vil_Glock","RH_g17","vil_Glock_o","RH_g17sd","RH_g18","RH_g19","RH_g19t","vil_MP5_EOTech","vil_MP5SD_EOTech","RH_tec9","RH_m1911","RH_m1911sd","RH_m1911old"," vil_uzimini","vil_uzimini_SD","RH_mk22","RH_mk22sd","RH_mk22v","RH_mk22vsd","RH_p38","RH_ppk","RH_mk2","RH_p226","RH_p226s","RH_bull","RH_tt33","RH_usp","RH_uspm","RH_uspd","vil_USP45","vil_USP45SD","vil_USP","vil_USPSD","vil_uzi","vil_uzi_c","vil_uzi_sd","RH_vz61"];

Awesome dude! Save me some time :)

BTW, does crafting ore into bars work for you?

Link to comment
Share on other sites

Hi, nice script, works well. I just need to add the rest of the guns to it. I have a question for ya though. Could this script affect crafting stuff like turning gold ore into bars & such? One of my users was trying to make some scrap metal from iron ore and asked how long it takes because he said it was taking forever. I then tried to craft a gold bar and it just sits there doing the animation over and over and nothing happens. I let it go for 5 minutes and still no gold bar. I'm not sure if this script is the cause or not since I never tried crafting anything before installing this script. I have nothing else that uses the right click feature other than the vanilla Epoch stuff. Any ideas?

 

have you tested this with no mods installed? some things in epoch are buggy on their own....

Link to comment
Share on other sites

  • 3 weeks later...

Hi all! Thank you for this great script and "deploy anything"!

 

But i have a little problem..

 

Battleye kicked players when right click on the gun  :( :

 

Player #1 Giber (f0a6aca1b13078ccaeef82f7efd5fcc0) has been kicked by BattlEye: Script Restriction #158

 

scripts.log:

 

05.08.2014 06:43:02: Giber (80.250.224.112:41366) f0a6aca1b13078ccaeef82f7efd5fcc0 - #158 "tRandom);
sleep 7.5;
player fire _weapon;
sleep 1;
player setDamage 1.5;
} else {
taskHint[_exitWith, DZE_COLOR_DANGER, "taskFai"
 
 
How to fix?
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

Hi all,

I have followed these steps multiple times, and can not even right click on my pistol. I have tried various weapons and added the weapons that Anarior posted.

Do I need any thing else to make this work?

Can anybody shed some light on this for me please?

Cheers

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...