"Bleed Out" Death System (+REP)

JeveKnight

New Member
Reaction score
2
I really need to learn how to do this type of death system:
If your hero gets below 50 health, he gets knocked down and can only use a pistol to defend himself (my map is a zombie survival, so I have modern weaponry) and can shoot zombies around you, but you're bleeding out. A teammate must come by and "pick up" the fallen one via ability, or he will die in 60 seconds. If the hero dies due to bleeding out or zombie attacks after falling, he becomes a spectator (Ghost), fellow teammates cannot see him and he can run around.

Id like to know how to do all the triggers.
How do I do all this? +Rep to helpers thanks
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
perhaps you can switch the units with a building that can't move
and when someone uses the ability you mentioned, then you switch the units back
this isn't a very good way because they are heroes and they need to set stat points and items =(
or you can set the movement speed
unit- movement speed
to really low or nothing, so when they move it's just a waste of time get nowhere and decide to attack
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I smell...Gears of War + Call of Duty mix :p .
I'd probably go with the Movement Speed thing YourFace said.

As for the Ghost, I'm thinking maybe a variable that holds if you're in the bleed-out state or not, 0 for no, 1 for yes, and if you die while it's 1, you become a Ghost.
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
for the ghost thing i'd just give a buff to the bleeding unit
and if the bleeding unit has buff when it dies, then create a ghost at that location
Triggering unit has (Bleeding Buff( equal to true) is a boolean comparison
 

JeveKnight

New Member
Reaction score
2
Yeah youre right wolfie, all I need is a gears of war style bleed-out system and if you dont get picked up within 60 seconds you die, and if you die regardless of bleeding out or from enemy attack you become a ghost in the position where you died.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Well, in Gears of War you can't shoot [at least in number two I believe], which is where CoD4 came in :) .

And it's up to you to use a variable or a buff.
Personally, I'd use a variable, but buff would most likely be easier.
Whatever you're comfortable with.

Here's some rough layouts for you:

a unit is attacked.
if unit <= 50 life, give unit "Bleed Out" buff else do nothing

a unit dies
if dying unit has bleed out buff = true, create ghost else do nothing

I'm guessing for "picking up" there will be a skill.

ability being cast = pickup
if unit has bleed out buff = true, remove buff, set movement speed = ###, [give hp?] else do nothing

EDIT: I can make some real triggers in WE if you want?
 

YourFace

<span style="color:#9C9C9C;"><strong>Runner Up - T
Reaction score
91
make a dummy unit cast a spell that has no effect, and give it a buff
then do the following,
this guy made this trigger for me, and it taught me alot :D
Code:
Untitled Trigger 034
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to DummySpellThatHastheBuffIToldYouAbout, call it whatever you want, base it off of lightning shield
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Unti_With_Array[(Integer A)] Equal to (no unit)
            Then - Actions
                Set Integer_With_Array[(Integer A)] = 60
                Set Boss = (Triggering unit)
                Trigger - Turn on Crackers <gen>
            Else - Actions
Code:
Crackers
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Unti_With_Array[(Integer A)] Not equal to No unit
                    Then - Actions
                        Set Integer_With_Array[(Integer A)] = (Integer_With_Array[(Integer A)] - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Integer_With_Array[(Integer A)] Equal to 0
                            Then - Actions
                                Unit - Kill Unti_With_Array[(Integer A)]
                            Else - Actions
                    Else - Actions
array size is 100 but you can mkake it bigger if you have a lot of heroes
 

WolfieeifloW

WEHZ Helper
Reaction score
372
What do those even do?
There's like 4 different variables.
My way uses no variables and is much more user-friendly :p .
 

JeveKnight

New Member
Reaction score
2
make a dummy unit cast a spell that has no effect, and give it a buff
then do the following,
this guy made this trigger for me, and it taught me alot :D
Code:
Untitled Trigger 034
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to DummySpellThatHastheBuffIToldYouAbout, call it whatever you want, base it off of lightning shield
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Unti_With_Array[(Integer A)] Equal to (no unit)
            Then - Actions
                Set Integer_With_Array[(Integer A)] = 60
                Set Boss = (Triggering unit)
                Trigger - Turn on Crackers <gen>
            Else - Actions
Code:
Crackers
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Unti_With_Array[(Integer A)] Not equal to No unit
                    Then - Actions
                        Set Integer_With_Array[(Integer A)] = (Integer_With_Array[(Integer A)] - 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Integer_With_Array[(Integer A)] Equal to 0
                            Then - Actions
                                Unit - Kill Unti_With_Array[(Integer A)]
                            Else - Actions
                    Else - Actions
array size is 100 but you can mkake it bigger if you have a lot of heroes

Wow, that's a complicated code lol.
 

C0mput3r

New Member
Reaction score
20
a unit is attacked.
if unit <= 50 life, give unit "Bleed Out" buff else do nothing
might not work so well because "a unit is attacked" is before the unit takes the damage. (ie. The arrow is still in the air)

Code:
Add Unit to Bleeding
    Events
        Unit - A unit enters (Entire map)
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Trigger - Add to Bleeding <gen> the event (Unit - (Triggering unit) Takes damage)
Assuming that your Heros are the ones with the bleeding effects.


Code:
Bleeding
    Events
    Conditions
        (Life of (Triggering unit)) Less than or equal to 50.00
    Actions
        Set tmpPoint = (Position of (Triggering unit))
        Unit - Create 1 Dummy (General) for (Owner of (Triggering unit)) at tmpPoint facing Default building facing degrees
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Orc Raider - Ensnare (Triggering unit)
        Custom script:   call RemoveLocation (udg_tmpPoint)


All you need is a custom Ensnare with no missile art, and a duration of 0 (close to infinate)


Dont forget to add some blood effects to the Ensnare buff and change its name. Personally, I like the Blood Elf blood spawned effect. (Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl)


Now for the healing ability, you could either use a trigger to Unit-Remove Specific Buff, or you can base the healing ability off of something that removes a buff like Purge, but then you'll need to trigger the healing effect...

Code:
Medipak
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Purge
    Actions
        Unit - Remove Ensnare (Ground) buff from (Target unit of ability being cast)
        Unit - Set life of (Target unit of ability being cast) to (Max life of (Target unit of ability being cast))
 

WolfieeifloW

WEHZ Helper
Reaction score
372
might not work so well because "a unit is attacked" is before the unit takes the damage. (ie. The arrow is still in the air)
You're really going to notice that you get a buff before an arrow hits you?
Unless the projectile speed is very low, I think we're good :) .

C0mput3r said:
All you need is a custom Ensnare with no missile art, and a duration of 0 (close to infinate)
Zero is infinite, you need to set it to 0.01 or 0.1, whatever is smallest without being zero.
 

JeveKnight

New Member
Reaction score
2
Well, in Gears of War you can't shoot [at least in number two I believe], which is where CoD4 came in :) .

And it's up to you to use a variable or a buff.
Personally, I'd use a variable, but buff would most likely be easier.
Whatever you're comfortable with.

Here's some rough layouts for you:





I'm guessing for "picking up" there will be a skill.



EDIT: I can make some real triggers in WE if you want?

Thanks that was useful.
I decided to just make it like gears,you get knocked down (unit plays death animation), then your unit is paused, and you become unpaused when a friendly comes by and picks you up. A buff is given to the unit, and if 60 seconds later the buff is still in effect or something, he will die. But if he is picked up in time, he will be unpaused, unbuffed and health will go up.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I can help you with this, if you want.
Send me a PM if you want the help :D .

EDIT: You might want to set the screen a red tinge when they are bleeding out, for effect ;) .
 

JeveKnight

New Member
Reaction score
2
might not work so well because "a unit is attacked" is before the unit takes the damage. (ie. The arrow is still in the air)

Code:
Add Unit to Bleeding
    Events
        Unit - A unit enters (Entire map)
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Trigger - Add to Bleeding <gen> the event (Unit - (Triggering unit) Takes damage)
Assuming that your Heros are the ones with the bleeding effects.


Code:
Bleeding
    Events
    Conditions
        (Life of (Triggering unit)) Less than or equal to 50.00
    Actions
        Set tmpPoint = (Position of (Triggering unit))
        Unit - Create 1 Dummy (General) for (Owner of (Triggering unit)) at tmpPoint facing Default building facing degrees
        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Orc Raider - Ensnare (Triggering unit)
        Custom script:   call RemoveLocation (udg_tmpPoint)


All you need is a custom Ensnare with no missile art, and a duration of 0 (close to infinate)


Dont forget to add some blood effects to the Ensnare buff and change its name. Personally, I like the Blood Elf blood spawned effect. (Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl)


Now for the healing ability, you could either use a trigger to Unit-Remove Specific Buff, or you can base the healing ability off of something that removes a buff like Purge, but then you'll need to trigger the healing effect...

Code:
Medipak
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Purge
    Actions
        Unit - Remove Ensnare (Ground) buff from (Target unit of ability being cast)
        Unit - Set life of (Target unit of ability being cast) to (Max life of (Target unit of ability being cast))

Thanks man, very useful :)
Ive narrowed down my preferences, and want a sort of Swat aftermath style of death, where you can pickup your friends, but eeryone has the ability to pick up.
Or like Extreme Candy War2004, except your friends help you up and theyre not ghosts.
Or like gears of war.
 

C0mput3r

New Member
Reaction score
20
Zero is infinite, you need to set it to 0.01 or 0.1, whatever is smallest without being zero.

Well, the point of freezing a unit's movespeed for 0.01 seconds with ensnare kinda defeats the point =P

I just tried to replace as much triggering as possible. So I used the ensnare's ability to remove movespeed, instead of triggering it =D



Edit: Well you could just remove the buff with Purge =D
Or triggers.. if its easy :p
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Triggering it is just as easy :D .
And 0 is still infinite.
And yeah, 0.01 defeats the point, but since there is no constant we can set it to, triggering it seems most logical.
 

JeveKnight

New Member
Reaction score
2
Triggering it is just as easy :D .
And 0 is still infinite.
And yeah, 0.01 defeats the point, but since there is no constant we can set it to, triggering it seems most logical.

True
What kind of Icon do you guys think would work for the "Pick Up" Ability?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top