| 08-04-2006, 09:22 PM | #1 |
i have a spell that uses triggers to damage a unit when sed unit attacks, a curse you could call it... the skill is based of the ability 'soul burn' but ive removed damage so the only reason for the spell is to deliver the buff, but heres my trigger Trigger: this doesnt work but i also want to know: how do i include the level of the ability in the damage returned to the attacking unit thanks for the help ![]() |
| 08-04-2006, 10:24 PM | #2 |
Damage taken <- this only works for Takes Damage event. in other words having your unit do 3x damage using trigger would be pretty hard...however you might find the demolish ability useful here ![]() as for the second question - i never figured out is there really a way to check the level of a buff...or at least the unit that casted it. |
| 08-04-2006, 10:32 PM | #3 |
The damage has not been dealt yet, you'll want to use the unit takes damage event; it's a unit specific event so you'll need to create a trigger when units are attacked or create a trigger for each unit on the map. For determining the level, I think you'll want to store level of the buff in an integer variable, something like this I think. Trigger: Actions:
![]() Custom Script: local integer level = 0
![]() Custom Script: set level = GetUnitAbilityLevel(GetDamageSource(), [BuffID])
![]() Custom Script: call UnitDamageTarget(GetTriggerUnit(), GetDamageSource(), GetEventDamage() * 3 * level, false, true, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL, null ) |
| 08-04-2006, 10:40 PM | #4 |
is there neway specify this without using custom texts? naakaloh is there nething i need to add in the () parenthesis? |
| 08-04-2006, 10:51 PM | #5 |
No, I think I filled all the parameters correctly. There really isn't any way using the normal map editor to create triggers and add events, actions, and conditions without using JASS. You can minimize the use of Custom Script, but there isn't really any way to completely get rid of it. Of course, I would suggest instead that you learn JASS and do everything with custom script. |
| 08-04-2006, 11:59 PM | #6 |
i used all thre custom scripts and copied them excactly and when i saved the game it said that the last two scripts required a name and also: Trigger: Custom Script: set level = GetUnitAbilityLevel(GetDamageSource(), [BuffID])where it says [BuffID] do i leave that or do i put the ID of the Buff? |
| 08-05-2006, 12:11 AM | #7 |
The later |
| 08-05-2006, 12:11 AM | #8 |
the id. i tried with GetUnitAbilityLevel back when i was making an aura and it always returned 1...are you sure that works? oh and btw you can add events without the use of custom script (jass), there is a trigger - add event action. however the problem here is that takes damage responds to absolutely any damage which includes spells... if you know the attack speed of the unit you can perhaps use unit is attacked, set the current hp of the attacked unit in a variable and then wait <unit's attack speed>. after that you do variable - current hp and you should get the damage the attacker done. yet i still think you should check out demolish... |
| 08-05-2006, 12:17 AM | #9 |
Trigger: Empathy
that is my recent trigger (wich is deactivated from compile errors) and [B000] is the id of my buff (its custom) |
| 08-05-2006, 12:20 AM | #10 | |
Oh, if it always returns 1, then it must not work. I assumed it did, so it must act as more of a marker. If you can't get it to work with Demolish, like SFilip suggested, then you can probably only do it with JASS. Quote:
Edit: The value for the buff should be in single quotes not brackets, my mistake for misleading you, I assumed you knew. ('B000') Also, the Unit is attacked event is not going to work, you'll need to use Unit takes damage. |
| 08-05-2006, 12:24 AM | #11 |
Custom script: GetUnitAbilityLevel(GetDamageSource(), [B000]) should be Custom script: GetUnitAbilityLevel(GetDamageSource(), 'B000') but you're still using the wrong event...it will never work this way. as i said you must use takes damage event...and this event must be speicific so you have to add it from some other trigger (most likely using a pick every unit in region...). |
| 08-05-2006, 05:28 AM | #12 |
so how would the triggers go to get the Unit takes Damage |
| 08-10-2006, 11:37 PM | #13 |
seriously, i cannot find the event: Unit Takes Damage some1 want to help ugh nvm i found it.... |
