Jump to content


Trigger Help


  • Please log in to reply
19 replies to this topic

#1 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 13 January 2010 - 07:43 AM

I basically made a self apothic shield based on berserk (all data set to zero)
and made the triggers and variables and hashtables
managed the spill damage and if the damage was over the units max health
works great. but when the unit is hit too fast they gain health, and if there is a unit with the buff while the original is getting damaged the unit heals as well

my guess is the fact that the variables screw it up, but i need a wait for one of the set paths to activate if the damage is not fatal simply because the unit will heal before getting attacked resulting in loss of health if the unit has 400/400.

I can post the trigger if you need further information.
thanks ahead of time.

D.

Edited by Devalut, 13 January 2010 - 07:44 AM.


#2 Mamma Mu

Mamma Mu

    Onin- likes small boys

  • Members
  • PipPipPipPipPip
  • 1300 posts
  • Interests:I'm not gonna write about my interests, because<br />1. I don't have any<br />2. Maybe I have, but why should I share them with you?<br />3. I have a social life which I don't intend to share with some random assholes on the intwerwebz<br />Even thou the climate is changing and we'll never know what's actually happening so it's best to just hope to live long and happily. We're all gonna die one day, most of us will never know how we're gonna die until the actual moment we die unless the person who knew how he/she would die had planned it, thou making it a suicide. As some of you guys might know, there's a 1000 character limit on this little piece of shit and I've only reached 670 so far. Only because I want to reach the limit I'm totally gonna write here until I've exactly reached the limit. For you pedos/stalkers out there, I live in Sweden (northern europe/scandinavia), to be precise in Stockholm which is Sweden's capital. Tbh there are more stuff in Sweden than blonde girls. Unfortunately I haven't
  • Bnet Name: G-Arena: Shjort
  • Bnet Realm:Azeroth

Posted 13 January 2010 - 08:14 AM

wat

#3 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 13 January 2010 - 08:40 AM

Wow Three letters your "brilliant", your also the most "artistic" person Ive ever witnessed in my entire life. you probably gave a good "ten" maybe "twelve minutes" making that single post, your a "hero". please tell me your secret to what possessed you to make such a "genius" post "good sir".

replace all fields marked with "" with a negative adjective, or lower integer form so my sarcasm can be displayed to the fullest, and so my insult to you is recognized.

Edited by Devalut, 13 January 2010 - 08:42 AM.


#4 Mamma Mu

Mamma Mu

    Onin- likes small boys

  • Members
  • PipPipPipPipPip
  • 1300 posts
  • Interests:I'm not gonna write about my interests, because<br />1. I don't have any<br />2. Maybe I have, but why should I share them with you?<br />3. I have a social life which I don't intend to share with some random assholes on the intwerwebz<br />Even thou the climate is changing and we'll never know what's actually happening so it's best to just hope to live long and happily. We're all gonna die one day, most of us will never know how we're gonna die until the actual moment we die unless the person who knew how he/she would die had planned it, thou making it a suicide. As some of you guys might know, there's a 1000 character limit on this little piece of shit and I've only reached 670 so far. Only because I want to reach the limit I'm totally gonna write here until I've exactly reached the limit. For you pedos/stalkers out there, I live in Sweden (northern europe/scandinavia), to be precise in Stockholm which is Sweden's capital. Tbh there are more stuff in Sweden than blonde girls. Unfortunately I haven't
  • Bnet Name: G-Arena: Shjort
  • Bnet Realm:Azeroth

Posted 13 January 2010 - 09:48 AM

Could you express yourself a little bit clearer (the first post)? If you wish to reach enlightenment and really reach Nirvana then you totally missed the point.
Post the trigger if you want any help.

edit:
**HINTHINTHINT**
Insulting people won't get you anywhere in life

Edited by Mamma Mu, 13 January 2010 - 09:50 AM.


#5 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 13 January 2010 - 02:29 PM

Ahaha, i knew went a overboard, please forgive me it is my nature to Attack Spammers. Please do not consider the bitter taste my of my last post.
here:RF Damage
    Events
    Conditions
        ((Triggering unit) has buff Ruined Flesh ) Equal to True
    Actions
        Set RF_Damage = (Damage taken)
        Set RF_Unit = (Load (Key RFUnit) of (Key (Triggering unit)) in RF_Hash)
        Set RF_ShieldLife = (Load (Key life) of (Key (Triggering unit)) from RF_Hash)
        Set RF_ShieldLifeInteger = ((Integer(RF_ShieldLife)) - (Integer(RF_Damage)))
        Hashtable - Save (RF_ShieldLife - RF_Damage) as (Key life) of (Key (Triggering unit)) in RF_Hash
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RF_Damage Greater than or equal to RF_ShieldLife
            Then - Actions
                -------- Anti Spill --------
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RF_Damage Greater than or equal to (Life of (Triggering unit))
                    Then - Actions
                        -------- Unit save Anti spill --------
                        Unit - Add Lifebonus (Greater) to (Triggering unit)
                        Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + RF_Damage)
                        Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                        Special Effect - Destroy (Last created special effect)
                        Floating Text - Create floating text that reads (String(RF_ShieldLifeInteger)) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 100.00%), and 0.00% transparency
                        Floating Text - Set the velocity of (Last created floating text) to 256.00 towards 90.00 degrees
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
                        Floating Text - Change the lifespan of (Last created floating text) to 0.80 seconds
                        Wait 0.00 seconds
                        Unit - Remove Lifebonus (Greater) from RF_Unit
                        Wait 0.00 seconds
                        Unit - Set life of RF_Unit to ((Life of RF_Unit) + (Real(RF_ShieldLifeInteger)))
                    Else - Actions
                        -------- Normal Anti Spill --------
                        Unit - Add Lifebonus (Greater) to (Triggering unit)
                        Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                        Special Effect - Destroy (Last created special effect)
                        Floating Text - Create floating text that reads (String(RF_ShieldLifeInteger)) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (100.00%, 10.00%, 100.00%), and 0.00% transparency
                        Floating Text - Set the velocity of (Last created floating text) to 256.00 towards 90.00 degrees
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
                        Floating Text - Change the lifespan of (Last created floating text) to 0.80 seconds
                        Wait 0.00 seconds
                        Unit - Set life of RF_Unit to ((Life of RF_Unit) + RF_Damage)
                        Wait 0.00 seconds
                        Unit - Remove Lifebonus (Greater) from RF_Unit
                        Unit - Set life of RF_Unit to ((Life of RF_Unit) + (Real(RF_ShieldLifeInteger)))
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RF_Damage Greater than or equal to (Life of (Triggering unit))
                    Then - Actions
                        -------- Non Lethal --------
                        Unit - Add Lifebonus (Greater) to (Triggering unit)
                        Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + RF_Damage)
                        Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                        Special Effect - Destroy (Last created special effect)
                        Floating Text - Create floating text that reads (String(RF_ShieldLifeInteger)) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (10.00%, 100.00%, 100.00%), and 0.00% transparency
                        Floating Text - Set the velocity of (Last created floating text) to 256.00 towards 90.00 degrees
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
                        Floating Text - Change the lifespan of (Last created floating text) to 0.80 seconds
                        Wait 0.00 seconds
                        Unit - Remove Lifebonus (Greater) from RF_Unit
                    Else - Actions
                        -------- Basic recovery --------
                        Unit - Add Lifebonus (Greater) to (Triggering unit)
                        Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                        Special Effect - Destroy (Last created special effect)
                        Floating Text - Create floating text that reads (String(RF_ShieldLifeInteger)) at (Position of (Triggering unit)) with Z offset 0.00, using font size 10.00, color (10.00%, 100.00%, 100.00%), and 0.00% transparency
                        Floating Text - Set the velocity of (Last created floating text) to 256.00 towards 90.00 degrees
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
                        Floating Text - Change the lifespan of (Last created floating text) to 0.80 seconds
                        Wait 0.00 seconds
                        Unit - Set life of RF_Unit to ((Life of RF_Unit) + RF_Damage)
                        Unit - Remove Lifebonus (Greater) from RF_Unit

There is a initial cast before this that adds the unit to take damage event, and of course stops it from making more events.


#6 Mamma Mu

Mamma Mu

    Onin- likes small boys

  • Members
  • PipPipPipPipPip
  • 1300 posts
  • Interests:I'm not gonna write about my interests, because<br />1. I don't have any<br />2. Maybe I have, but why should I share them with you?<br />3. I have a social life which I don't intend to share with some random assholes on the intwerwebz<br />Even thou the climate is changing and we'll never know what's actually happening so it's best to just hope to live long and happily. We're all gonna die one day, most of us will never know how we're gonna die until the actual moment we die unless the person who knew how he/she would die had planned it, thou making it a suicide. As some of you guys might know, there's a 1000 character limit on this little piece of shit and I've only reached 670 so far. Only because I want to reach the limit I'm totally gonna write here until I've exactly reached the limit. For you pedos/stalkers out there, I live in Sweden (northern europe/scandinavia), to be precise in Stockholm which is Sweden's capital. Tbh there are more stuff in Sweden than blonde girls. Unfortunately I haven't
  • Bnet Name: G-Arena: Shjort
  • Bnet Realm:Azeroth

Posted 14 January 2010 - 10:11 AM

zawmg, rewrite it in jass and it'll be a lot easier to handle
btw I think that you should add a check to see the current hp percent and if it's below 50% heal before the damage actually comes otherwise if the unit have above 50% and the damage isn't lethal then heal after damage to avoid wasting the heal

#7 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 14 January 2010 - 03:02 PM

QUOTE(Devalut @ Jan 13 2010, 10:43 AM) View Post

works great. but when the unit is hit too fast they gain health,

What exactly are you asking, do you mean hit too fast and "they" gain health, who's they and what scenario is this hitting too fast taking place? Could mean too much and too confusing.
QUOTE(Devalut @ Jan 13 2010, 10:43 AM) View Post

and if there is a unit with the buff while the original is getting damaged the unit heals as well

So two units with this spell both gets healed if either one of them gets hit?

#8 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 14 January 2010 - 06:23 PM

QUOTE(Mamma Mu @ Jan 14 2010, 10:11 AM) View Post

zawmg, rewrite it in jass and it'll be a lot easier to handle
btw I think that you should add a check to see the current hp percent and if it's below 50% heal before the damage actually comes otherwise if the unit have above 50% and the damage isn't lethal then heal after damage to avoid wasting the heal


do you know that the trigger stops that damage, basically if the damage is 300 while the unit has 300/400 with 200 shield life, the unit would die; so i merged a double set of triggers specially made for stopping damage over the max life.

but when the UNIT is hit too fast they gain health, and if there is a unit with the buff while the original is getting damaged the unit heals as well  
QUOTE
What exactly are you asking, do you mean hit too fast and "they" gain health, who's they and what scenario is this hitting too fast taking place? Could mean too much and too confusing.
An unspecific name usually intends it to stay generic like a footman or a peasant, use your imagination.
QUOTE
So two units with this spell both gets healed if either one of them gets hit?

yes only if the damage is fast enough, flame strike does this quite well.


#9 Mamma Mu

Mamma Mu

    Onin- likes small boys

  • Members
  • PipPipPipPipPip
  • 1300 posts
  • Interests:I'm not gonna write about my interests, because<br />1. I don't have any<br />2. Maybe I have, but why should I share them with you?<br />3. I have a social life which I don't intend to share with some random assholes on the intwerwebz<br />Even thou the climate is changing and we'll never know what's actually happening so it's best to just hope to live long and happily. We're all gonna die one day, most of us will never know how we're gonna die until the actual moment we die unless the person who knew how he/she would die had planned it, thou making it a suicide. As some of you guys might know, there's a 1000 character limit on this little piece of shit and I've only reached 670 so far. Only because I want to reach the limit I'm totally gonna write here until I've exactly reached the limit. For you pedos/stalkers out there, I live in Sweden (northern europe/scandinavia), to be precise in Stockholm which is Sweden's capital. Tbh there are more stuff in Sweden than blonde girls. Unfortunately I haven't
  • Bnet Name: G-Arena: Shjort
  • Bnet Realm:Azeroth

Posted 15 January 2010 - 02:23 PM

QUOTE(Devalut @ Jan 15 2010, 04:23 AM) View Post

yes only if the damage is fast enough, flame strike does this quite well.


this is why you have to make it MUI, it's much easier to make stuff MUI in jass

#10 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 16 January 2010 - 02:30 PM

Triggering Unit probably is the problem here, you do have RF_Unit, why not use it throughout?

Edited by Rayzilla, 16 January 2010 - 02:30 PM.


#11 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 18 January 2010 - 05:27 AM

QUOTE
this is why you have to make it MUI, it's much easier to make stuff MUI in jass

the spell is mui, there is an add unit event that checks if the unit is in it, if so the trigger is skipped.

QUOTE
Triggering Unit probably is the problem here, you do have RF_Unit, why not use it throughout?


Triggering Unit is a multiple use rf_unit however is not, meaning that half way through this trigger another unit will be set to rf_unit and the overlapped unit will be ignored.

#12 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 19 January 2010 - 02:11 PM

Maybe use hashtables then =/ it's less confusing, completely MUI, easy to use, and never bugs up cause I feel that setting rf_unit to something else half through would somehow mess with it since we don't actually know what's the whole trigger for your spell.

Edited by Rayzilla, 19 January 2010 - 02:29 PM.


#13 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 20 January 2010 - 07:38 PM

QUOTE
Maybe use hashtables then =/ it's less confusing, completely MUI, easy to use, and never bugs up cause I feel that setting rf_unit to something else half through would somehow mess with it since we don't actually know what's the whole trigger for your spell.

Judging by your post you did not read the thread, please read the thread before posting.
QUOTE
Set RF_Unit = (Load (Key RFUnit) of (Key (Triggering unit)) in RF_Hash)
Set RF_ShieldLife = (Load (Key life) of (Key (Triggering unit)) from RF_Hash)




#14 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 21 January 2010 - 04:03 PM

I got good news and bad news for you then, good news, I was screwing with you cause we get 99/100 people who ask in this section are retarded, somewhat. Bad news, I was screwing with you wasting your time.

I'm going to assume you set the unit, damage, and a set shield life saved into hashtable, so I won't bother with that. Several things.
Reason why you heal when attacked fast is because of wait, well I'm guessing anyways for now, need to test. Wait command has a 0.00+/-0.05 second error, so don't ever use it in instance spells again like triggered healing, use a timer instead at 00 second, destroy timer after use, etc., it won't leak (if you fixed it)or cross into other trigger.
Your trigger is too over loaded, try to optimize.

So far tested it with two units, no healing when damaged when when attacked by .01second attack cooldown units, no healing from flaming strike, works, try it. Download and text then look at trigger.
Keep in mind you didn't post your whole spell trigger, so we can't help you even if we tried, and psot the triggers without the texts next time, they really annoy people as it's useless when they're trying to read/fix the code.


e- I'm guessing it's your unit taking damage event trigger that messed up.

Attached Files


Edited by Rayzilla, 21 January 2010 - 04:08 PM.


#15 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 22 January 2010 - 03:18 AM

QUOTE
I was screwing with you cause we get 99/100 people who ask in this section are retarded, somewhat. Bad news, I was screwing with you wasting your time.

Ha ha i feel flattered that you (for now) count me as not in that list, thanks for your reply ill look at it right away.

QUOTE
psot the triggers without the texts next time, they really annoy people as it's useless when they're trying to read/fix the code.


Ill put it in a quote box next time, but for this ill probably just give the map instead of  making this a three page post tongue.gif.

I as well have good and bad news, being the sadistic person i am ill start with bad: If the unit has 100% life (for ex. custom unit  400/400) in your trigger they wont heal on any first consecutive hit, so with flame strike they would be left with 385/400 so the unit is left with 92.5% life instead of blocking it, try it for your self just set their hp too 100% and try the map again.With that in mind, the only reason why the units aren't getting damaged while both of them are in flame strike is simply because the healing is activated immediately and not timed, I specifically put the wait simply to allow spilled damage to be negated after the life bonus was removed, it was also used to help units with 100% hp to keep it and not skip out on the first hit.

okie dokie now on the good news, the countdown is much faster than wait, i absolutely love it to pieces.
here is my map the shield is set to 500 and the finger of death is 500 as well.

Edited by Devalut, 22 January 2010 - 05:49 PM.


#16 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 22 January 2010 - 05:00 PM

This solves all the problem exept one, when both units take damage at the same time ie: aoe spells/damage.

Attached Files


Edited by Rayzilla, 22 January 2010 - 05:01 PM.


#17 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 23 January 2010 - 03:32 PM

Actually nevermind, that's only a first cast issue, load the spell on map initialization and you should be fine.

#18 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 24 January 2010 - 10:58 AM

What do you mean by loading on map initialization?

#19 Rayzilla

Rayzilla

    Enthusiast

  • Members
  • PipPipPipPipPip
  • 442 posts
  • Bnet Name:raydude714
  • Bnet Realm:Azeroth

Posted 24 January 2010 - 11:14 AM

It's just giving the spell to a random unit and killing the unit or have him cast the spell and the spell takes into effect.

Either way, scratch my last post, it still doesn't work with aoe spells as two units are using the same trigger at the same instance, let me try to find a way around it first.

Edited by Rayzilla, 24 January 2010 - 11:14 AM.


#20 Devalut

Devalut

    Newbie

  • Members
  • Pip
  • 15 posts
  • Bnet Name:Devalut
  • Bnet Realm:Azeroth

Posted 24 January 2010 - 06:10 PM

Aye aye captain, you seem to be tightly coiling your mind around this; I nearly grew a tumor from trying to sync the basic stages of anti spill. best of luck, I appreciate all of your help.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users