HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Help: Aura for Summons

07-25-2003, 09:09 PM#1
KenjiMcCloud
This is what I want to do: An aura that makes summons last longer.
I based an aura off Devotion Aura to keep with the character of the skill. Now I have to enhance the skill with triggers, nothing new yet. However, there's a problem. The only triggers that regard the expiration timer of the summons I want to prolong are these:
Add Expiration Timer
Pause/Unpause Expiration Timer
Great Shit. I wish there was a "Set expiration timer" function, but there is not. I give each summoned unit an expiration timer by a trigger anyway, so I can easily assign the expiration timer original value to the custom value of the unit. Now what I tried to do is this:
Event:
Periodic with 1 second
Condition:
None
Event:
Pick all units matching these conditions: [In Range of aura]&[Classified as summons]
And do these actions:
Pause Expiration timer
Wait for ((Level of Aura*2)/(Custom Value of Unit)).
Unpause Expiration timer


Now in theory, this would keep the expiration timer from expiring for a fraction of a second each second. However, it doesn't work. There are some problems I encountered:
In game, the expiration timer will just be all black and the summon will never expire, even if it is out of range of the aura. And then, the Aura has 10 levels and there will be 15+ summons with expiration timers of 60+ seconds in there. That means the absolute waiting time in that function would be more than a second. I don't know if the units are picked each and if the waiting part is done for each unit or all as one, but I don't know how to do this better.
I would try to make the pausing into one "Pick every unit" condition, then do a separate wait function, and then unpause it again for all. I didn't try that yet, though.


And then I would like to know why all the abilities with custom icons are full green if I am not able to research them:/

Thanks in advance.
07-28-2003, 06:08 PM#2
KenjiMcCloud
No, seriously, I want this to be sorted out. Don't let this fall to page 6 with 0 replies. That's too bad mannered;(
07-28-2003, 06:52 PM#3
Panto
Without recreating your trigger, I'm guessing that the periodic event continues to pause it when it's unpaused.
You have an event that happens every second which overlaps with itself.

But that's hazy. Sorry.

EDIT: And this is a forum, not IRC. You're going to have to wait a while for responses. It's not the Battle.net forum, where a post is shuffled to the 8th page before anyone even sees it.
07-28-2003, 07:20 PM#4
FrigaMache
may need an arithmatic action broken down into other stuff
07-28-2003, 08:25 PM#5
Newhydra
Here's a function that might help you:

native UnitRemoveBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns nothing

Could remove and re-add the expiration timer
07-29-2003, 08:34 AM#6
Krakou
Have you tried to use a negative value in the action Add Expiration Timer ?
07-29-2003, 12:50 PM#7
KenjiMcCloud
Quote:
EDIT: And this is a forum, not IRC. You're going to have to wait a while for responses. It's not the Battle.net forum, where a post is shuffled to the 8th page before anyone even sees it.
You know, I actually did fish this thread from the 6th page. Look at the dates and see that there are 3 days in between. And considering that no one answered when it was on the 6th page I figured that it's ok to bump it once.
Quote:
Here's a function that might help you:

native UnitRemoveBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns nothing

Could remove and re-add the expiration timer
I don't even know what you are talking about. I'm not involved with anything in actual JASS, I use the graphical interface. And even then, considering that "boolean timedLife" is a boolean(*cough* true/false), it's most probably not responsible for the expiration timer of the unit. More like "Does this unit have an expiration timer?
Maybe the naming is messed up too, I don't know where you got that from.
Quote:
I'm guessing that the periodic event continues to pause it when it's unpaused.
You have an event that happens every second which overlaps with itself.
I considered that, but in its current form the aura gives 2% summon time increase per level. I.e. AuraLevel*2/ExpirationTimerValue is the time for which the timer is paused each second... If the ETV is 50 seconds then at level five the calculation is (10/50)*50, which results in...wait. 10 seconds. That's not 10 seconds, the calculation is wrong:/. But that's besides the point. I do the calculation each second so that every summon is affected proportionally etc. I guess I'll fix that, but it can't be the source of the error.
I have an idea, let me try that I'll post some time soon.

Edit: Ok, it works:)
I separated the Wait function from the Pick Units one. So there is "Pick Units and Pause", "Wait" and "Pick Units and Unpause" as separate functions now. Perfect.