CameraChick

[HELP] 10-second God Mode

16 posts in this topic

Posted (edited)

I am currently using a script that works like this:

Instead of death, your screen shakes for five minutes. You can only move slowly, but aiming is impossible. You can use a First Aid Kit to heal yourself, and then all is well. The script works great, BUT it makes it so you have GOD MODE while you are in this state of delirium. Here is the script, followed by what I would like to do with it, if someone is able to help.

Spoiler

private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
_unit             = _this select 0;
_selectionName    = _this select 1;
_amountOfDamage   = _this select 2;
_sourceOfDamage   = _this select 3;
_typeOfProjectile = _this select 4;

_isDeliriumActive = true;
_neededDamageToActivateDelirium = 0.95;
deliriumMinutes  = 5;
minimumDamageToRestoreFromDeliriumStatus = 0.85;
restoreFullHealthAfterDelirium = true;
deliriumCameraShakeStrength = 10;
deliriumCameraShakeFrequency = 5;

if (_isDeliriumActive) then {
    if ((damage _unit) + _amountOfDamage > _neededDamageToActivateDelirium && !(player getVariable ["deliriumActive", false])) then
    {
        player setVariable ["deliriumActive", true];
        player allowDamage false;
        player setDamage _neededDamageToActivateDelirium;
        _amountOfDamage = 0;
        enableCamShake true;
        _amountOfDamage;
        _this spawn
        {
            _endTime = time + (deliriumMinutes * 300);
            while{minimumDamageToRestoreFromDeliriumStatus <= damage player && time <= _endTime} do
            {
                addCamShake [deliriumCameraShakeStrength, deliriumMinutes * 300, deliriumCameraShakeFrequency];
                uiSleep 1;
                
                if (time >= (_endTime - 1)) then {player setDamage 1;};
            };
            player allowDamage true;
            enableCamShake false;
            resetCamShake;
            if (restoreFullHealthAfterDelirium) then {player setDamage 0;};
            player setVariable ["deliriumActive", false];
        };
    };
};

I would like to make it so the delirium/god mode only lasts for 10 seconds. AFTER that 10 seconds, if the player has not healed to full, they can be killed by the next shot. If they do not get shot again for 5 minutes, they remain in the delirium state until they automatically die at the end of 5 minutes. 

Any help is greatly appreciated.

Edited by CameraChick
1 person likes this

Share this post


Link to post
Share on other sites
Advertisement
On 3/11/2016 at 7:17 PM, Digital Purge said:

like this

 

Okay, a month has gone by with no response. @Digital Purge, did you actually have something?

Share this post


Link to post
Share on other sites

Posted (edited)

I have begun toying with using different animations while in the damaged/delirium state: So far, I LOVE these:

GestureSpasm2
GestureSpasm3
GestureAgonyCargo

BUT the problem is that once the animation plays, and the player is healed (delirium ends), the player STAYS in the animation state. Does anyone know a way to normalize the player's animation?

Edited by CameraChick

Share this post


Link to post
Share on other sites

I know it seems like I am talking to myself here, but I would also like to know if anyone is willing to help with this modification (assuming we can figure out how to end the animation after player is healed; see above):

If player is below 40% health: only actions available are:  PlayerWalkB,/F/L/LB/LF/R/RB/RF

If player is below 20% health: only actions available are: GestureSpasm0/1/2/3/4/5/6

If player is below 6% health: player becomes unconscious (60 seconds and then death if not bandaged/healed)

If someone is able to provide this script, I will pay via paypal once tested. I have done this before and I always come through. Just don't have the ability on my own. :) 

Share this post


Link to post
Share on other sites

well, to fix the godmode problem remove the  player allowDamage false;  and  player allowDamage true;

 

Share this post


Link to post
Share on other sites
On 4/11/2016 at 4:11 AM, InsertCoins said:

well, to fix the godmode problem remove the  player allowDamage false;  and  player allowDamage true;

 

True, and easy. However, the problem is that players just die WAY too fast. WAY too easy (IMHO).I wanted to allow a way that people could get shot up, but still have a chance to heal themselves. If they didn't have First Aid (or use it in time), they were SOL.

Share this post


Link to post
Share on other sites

Posted (edited)

In general, I'd say. It seems like as soon as you're shot you're dead (most of the time). 

Edited by CameraChick

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.