Help needed Invincibility buff while in a cockpit

Discussion in 'General Discussion' started by ArcticPrism, Aug 20, 2023.

  1. ArcticPrism

    ArcticPrism Commander

    Joined:
    Nov 4, 2016
    Messages:
    65
    Likes Received:
    45
    I'm trying to create a buff that would make you invincible but only while in a cockpit. The purpose of this is a hack fix because of that annoying lag bug where you can get killed while in your cockpit even with full HP/Shield. For myself , god mode works but I want other players on my server to stop having the issue as well.

    Creating the buff itself for invincibility and applying it was easy enough. I copied what furniture does to give you stamina regen and made a status effect that makes you invincible. The problem is controlling it. I don't know how to make the buff go away when you get out.

    { StatusEffect Name: Cockpit_Immunity
    Duration: 25
    Name: Cockpit_Immunity
    CastSound: UseActions/exhale
    Type: health
    # Stack: extend # should not stack to avoid exploit
    Description: igmEffectMedicStation
    Icon: TmpEff_Health

    { Child Immunity0
    Stat: health
    Amount: 25
    Rate: 1
    }
    }

    This was my dummy status effect I was using for testing. I also saw that there were variables that could be used to trigger it but none of them seem useful and I'm not sure if there is a list of things out there I could use that would work better.

    Stuff like:

    # BuffIf: varBodyTemp < 12
    # DebuffIf: varBodyTemp > 18

    I thought about doing something like making it set your temperature to some extreme amount like 300 and give you immunity to heat related status effects then it would go away if your temperature changed but in practice I don't think that would work out. There's too many things that can alter player temperature like simply being inside the cockpit.
     
    #1
    Last edited: Aug 20, 2023

Share This Page