| 12-07-2006, 10:25 PM | #1 |
Just curious... If I level up a unit from level 1 to level 18, does the event trigger only once or does it trigger 17 times? And also, if it triggers only once -- Would it trigger 17 times if I did a loop to level the hero in increments of one or since when jass runs it spends no game-time would it still only trigger once? |
| 12-07-2006, 10:27 PM | #2 |
You could probably figure out the answer faster if you just experimented instead of waiting for a reply. |
| 12-07-2006, 10:29 PM | #3 |
That requires access to a world editor. |
| 12-07-2006, 10:31 PM | #4 | ||
Quote:
I would guess only once, because if you use a Tome of Power which adds more than 1 level, then it only fires once despite gaining several levels. Quote:
It should trigger 17 times, because when the events are triggered they are probably placed into a queue and then read one at a time. I might be wrong, but that's my guess. And as wyrm said, it would probly be faster just to test it ;). Edit: Didn't read your second post in time. |
| 12-07-2006, 10:39 PM | #5 |
TaintedReality's assumptions are all correct. |
| 12-07-2006, 10:42 PM | #6 |
Agreed with above. EDIT: Er, I meant TaintedReality, but I guess agreeing with shadow1500 means the same thing. |
| 12-08-2006, 01:37 AM | #7 |
It WILL trigger 17 times, but I am unsure that it the level of (Triggering unit) would be accurate I guess testing is needed. |
| 12-08-2006, 03:36 AM | #8 |
Alright, well I'll run some tests on it and post my results when they come in. Thanks for the help guys. |
| 12-08-2006, 02:22 PM | #9 |
After a couple of mins of testing: Whether you use Add experience - <enough experience for level 18> - or Set hero level to - 18 - it will trigger only once. Hero level of - Triggering Unit - works perfectly fine in the event callback if you do the loop. |
| 12-09-2006, 10:40 PM | #10 | |
Quote:
|
