"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.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top