Jump to content
Sign in to follow this  
AmaZiinG

[Tutorial] Bleeding Script [5.0, 4.4R3]

Recommended Posts

Autor: Nijanu / Yves

1. Creat a new sqf file and named it fn_verbluten.sqf

// Author: Nijanu / Yves / aufgeräumt von Cherdenko
// Version: 1.1
// Beschreibung: Legt den Schadenswert fest wenn ein Spieler von einem Projektil getroffen wird / ein Blutungseffekt
//
Infos: Ihr könnt das Script nach euren Wünschen anpassen dies Gilt nur
als eine Grundlage für ein Verbluten nach Beschuss Script



// Abfragen:


private["_bleedoutmsgshwn", "_dmg", "_dmgPerTick", "_timeToDeath", "_dmgTickSec", "_ticksToDeath"];



// Angaben:
_timeToDeath = (12 * 60);
_dmgTickSec = 5; // alle x Sekunden wird schaden Hinzugefügt in dem Fall alle 5 Sekunden
_ticksToDeath = _timeToDeath / _dmgTickSec;
_dmgPerTick = 0.76 / _ticksToDeath; // Absprungbasis 0.8, entspricht kleinerer verletzung
_bleedoutmsgshwn = false;



// Weitere Abfragen:


while{true} do
{
waitUntil { damage player > 0.5 && damage player < 1.0 && (independent countSide playableUnits >= 2) };
while{(alive player && damage player >0.5)} do {
life_max_health = 0.80;
_dmg = damage player;
if (_dmg > 0.76) then { player setDamage (_dmg + _dmgPerTick / 2); } // Kurz vor dem Sterben nimmt die Blutung etwas zu.
else {player setDamage (_dmg + _dmgPerTick); };


If (!_bleedoutmsgshwn) then
{
hint "Achtung! Sie scheinen zu verbluten! Gehen sie umgehend in ein Krankenhaus oder benutzen sie Schmerzmittel!";
_bleedoutmsgshwn = true;
};
if (_dmg >= 0.75) then { // Jetzt sieht man Verschwommen ...
"dynamicBlur" ppEffectEnable true;
"dynamicBlur" ppEffectAdjust [2];
"dynamicBlur" ppEffectCommit 1;
};


sleep _dmgTickSec;
};
"dynamicBlur" ppEffectEnable false;
};

2. In the functions.hpp add:  (If you dont have a scripts folder make one !!!)

class scripts
{
file = "scripts";
class verbluten {};
};

3. Go in your fn_survival.sqf and add this:

[] spawn life_fnc_verbluten;

at the bottom

Finish !

Share this post


Link to post
Share on other sites
6 minutes ago, Deadlesszombie said:

rpt error logs instead of non-backed statement?

It does one bleed and that's it. Same respawn timer etc.. it's default.

Share this post


Link to post
Share on other sites
1 minute ago, Elkoy said:

It does one bleed and that's it. Same respawn timer etc.. it's default.

"Through this script, the player bleeds after a while and he gets a message that he should go to the hospital immediately or 
to connect. This happens only if he has been shot by a weapon."

respawn timer is not affected...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...