| 08-14-2004, 03:39 AM | #1 | ||
Okay, I'm having real trouble with this triggered ability. The ability is supposed to do the following.. ULTIMATE (l6) ABILITY Name: Sorrowbringer. Effect: Puts a target enemy to sleep for X seconds. After the duration, unless the affected unit was awoken, they die. How can I accomplish this? Currently, I have the following done (note, the hero has the ability called "Necropotence", which increases the effectiveness of all his other abilities, using Engineering Upgrade as a base). Quote:
Note: The "Run Sorrowbringer Death <gen>" trigger is as follows. Quote:
I need one of the following done: a) Fix the triggers I have done to make it actually work, or b) Create a much simpler (or more complex) trigger instead. Thanks! |
| 08-14-2004, 03:52 AM | #2 |
The problem is, that on your last trigger there is no triggering unit and you should use target unit of abillity beign cast, unless you want the caster to explode on it's place, you could fix it , by removing the run trigger part and do this: If NecropotenceSkillLevel Equal to 0 (( target unit of abillity beign cast) has buff Sleep) Equal to True then - Set targetUnit = target unit of abillity beign cast (Set it into a variable because the target unit might get lost after 10 sec, if you are using multiple units that cast this ability, try using only the target unit, on the explode action, see if it will work) Wait 10 seconds Unit - Explode tagetUnit (You may try target unit of abillity beign cast) |
| 08-14-2004, 03:54 AM | #3 |
The problem is that I -need- it so that it can be cancelled if the affected unit is woken up, otherwise, I'd do that. :p |
| 08-14-2004, 03:58 AM | #4 |
Sorry about this, but it's quite simple to solve this by doing this: If NecropotenceSkillLevel Equal to 0 (( target unit of abillity beign cast) has buff Sleep) Equal to True then - Set targetUnit = target unit of abillity beign cast (Set it into a variable because the target unit might get lost after 10 sec, if you are using multiple units that cast this ability, try using only the target unit, on the explode action, see if it will work) Wait 10 seconds if targetUnit has buff sleep equal to true then Unit - Explode tagetUnit (You may try target unit of abillity beign cast) else do nothing This will check if has the buff, I guess it is this that you want. ![]() |
| 08-14-2004, 04:15 AM | #5 |
Hold on, checking if it works. :p |
| 08-14-2004, 04:26 AM | #6 | |
Okay.. it's not working. x_x Here's what I have right now.. (I changed the base conditions a bit) Quote:
But, it's not working. What's wrong? |
| 08-14-2004, 04:28 AM | #7 |
I told you not to use triggering unit, because triggering unit is the unit that casted the spell, use the variable unit. |
| 08-14-2004, 04:33 AM | #8 |
D'oh! Stupid me.. sorry! I'll fix that right now. :p |
| 08-14-2004, 04:44 AM | #9 | |
Blah.. it still doesn't work. x.x; Okay, here it is.. again. :p I'm still tweaking around with things. Quote:
|
| 08-14-2004, 04:47 AM | #10 |
As a quick note, I changed the name of the buff from "Sleep" to "Sorrowbringer". :p |
| 08-14-2004, 04:47 AM | #11 |
1 - Why "Finishes casting an abillity" 2 - You messed up the conditions, look that lv1 is outside the "Or". |
| 08-14-2004, 04:49 AM | #12 |
I tried it with it inside, but it didn't work.. :/ |
| 08-14-2004, 08:03 AM | #13 |
That's because that wasn't the problem! The way you have it now, two conditions must be true: level must be equal to 1, and at the same time level must be equal to 2, 3 or 4. That doesn't work at all. Apart from that, this is also probably wrong: If (((Target unit of ability being cast) has buff Sorrowbringer) Equal to True) then do (Unit - Kill TargetUnitSorrowBringer) else do (Do nothing) replace the (Target unit of ability being cast) with TargetUnitSorrowBringer. And, really, use the event "starts the effect of an ability", not "finishes casting an ability". The second event doesn't even have "target unit of ability being cast" event response. And in the following lines, the second condition is redundant, because it is only natural that the target unit has the buff when the spell is cast: If - Conditions NecropotenceSkillLevel Equal to 0 ((Target unit of ability being cast) has buff Sorrowbringer) Equal to True Furthermore, when waiting, use the "wait - game time" action, not just "wait", because just "wait" doesn't take into consideration lag and stuff like that. Also, don't wait exactly 10 seconds, because in that time, the buff may already run out on it's own. Use something like 9.9 seconds. And when posting triggers here, use the [code] brackets instead of [quote] brackets. The code allows for multiple spaces and is easier to read. One last thing, the way this trigger works, your hero won't get any experience for killing with this spell (because he doesn't actually kill the unit, the trigger kills it) |
| 08-14-2004, 04:59 PM | #14 |
Well.. I'm officially stumped. :p How can I make it so that the unit who casts the ability kills the targetted unit? By the way, even with all the changes made to the spell, the unit -still- doesn't die (and trust me, the buff doesn't get lost for 3600 seconds. x3). Nnh.. I think I need an entirely new trigger/action. |
| 08-14-2004, 05:02 PM | #15 |
Okay.. here's the trigger so far: Code:
Sorrowbringer DeathTimer
Events
Unit - A unit Starts the effect of an ability
Conditions
Or - Any (Conditions) are true
Conditions
(Ability being cast) Equal to Sorrowbringer (Level 1)
(Ability being cast) Equal to Sorrowbringer (Level 2)
(Ability being cast) Equal to Sorrowbringer (Level 3)
(Ability being cast) Equal to Sorrowbringer (Level 4)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
NecropotenceSkillLevel Equal to 0
Then - Actions
Set TargetUnitSorrowBringer = (Target unit of ability being cast)
Wait 10.00 game-time seconds
If ((TargetUnitSorrowBringer has buff Sleep) Equal to True) then do (Unit - Kill TargetUnitSorrowBringer) else do (Do nothing)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
NecropotenceSkillLevel Equal to 1
Then - Actions
Set TargetUnitSorrowBringer = (Target unit of ability being cast)
Wait 9.00 game-time seconds
If ((TargetUnitSorrowBringer has buff Sleep) Equal to True) then do (Unit - Kill (Target unit of ability being cast)) else do (Do nothing)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
NecropotenceSkillLevel Equal to 2
Then - Actions
Set TargetUnitSorrowBringer = (Target unit of ability being cast)
Wait 8.00 game-time seconds
If ((TargetUnitSorrowBringer has buff Sleep) Equal to True) then do (Unit - Kill (Target unit of ability being cast)) else do (Do nothing)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
NecropotenceSkillLevel Equal to 3
Then - Actions
Set TargetUnitSorrowBringer = (Target unit of ability being cast)
Wait 7.00 game-time seconds
If ((TargetUnitSorrowBringer has buff Sleep) Equal to True) then do (Unit - Kill (Target unit of ability being cast)) else do (Do nothing)
Else - Actions
Do nothing |
