| 06-14-2008, 06:40 PM | #1 |
I need some ideas/suggestions regarding custom auras (with positive buffs) and/or an alternative. Currently, I have 3 ideas: 1) Standard aura - Sounds simple enough Pros: Relatively easy for end-user to deal with (nothing to be clicked) Can't be dispelled Cons: Can't really think of an effective way to tell the level of the aura on an affected unit (not aura-bearer). My current idea involves timers and arrays and sh*t like that, and seems like alot of hassle 2) Auras with periodic buffer - Basically, a substitute for an aura, that acts like an aura, by periodically casting a spell (every 2 seconds for example) on nearby units. Timer will then check the amount of time since last recast. If it's greater than 2.5 seconds, or something, units will no longer be under the effect of the ability, and everything associated with the buff will be cleared from the unit Pros: Won't be dispellable (unless a standard WC3 buffer skill is used) Again, end-user won't have to do any work Cons: If standard WC3 buffer skills are used, it can be dispelled Same con from normal aura-style ability applies. 3) Manually cast buffer skills - AoE around self buffer skills, manually cast by the player that buffs nearby allies Pros: Easier to code than the above Won't be dispellable (unless I specifically allow it to be) Cons: More work for end-user to cast the spells May not be suitable for certain heroes (e.g. low mana cap heroes) (more pro's and con's may be added as I think of them, or if people point them out) So, which do you think would be the most viable option, or do you have a better alternative to the above? |
| 06-14-2008, 06:56 PM | #2 |
Hmmm... can you get the level of a buff with GetUnitAbilityLevel and the buff code? It might store it, since it says the level of the buff-spell used on the tooltip. |
| 06-14-2008, 06:59 PM | #3 |
I tried that before, and I don't think it worked. I'll try it again and see what happens :) EDIT: Just tested, and it gives a value of 0 :( |
| 06-14-2008, 07:07 PM | #4 |
Wait, is this a gameplay or implementation question? Are you asking what kind of spell is more suitable for the game or what kind of spell is easier to code? |
| 06-14-2008, 07:09 PM | #5 |
Preferably both, if possible. I'd prefer a normal aura, but I'm not exactly sure how I'm gonna figure out how to check the aura's level for that unit and such. Manual-cast buffer skill is last resort since I don't want heroes to be limited to self-only passives, or have all active abilities, but it is the easiest to code I think. Suitability would probably be more important since if people don't like the ability, it will probably end up being replaced, which will just increase the amount of coding :\ EDIT: Just thought of something which -MIGHT- make auras a much more viable option. If I make a custom function which adds a dummy ability to the unit, and removes it X seconds later if a specificed buff is no longer present on the unit, then use that in conjunction with a repeating timer (thats repeats every 2 seconds or so) so that a unit will eventually lose the ability once they leave the AoE. Do you think that would be a good idea? |
| 06-14-2008, 07:38 PM | #6 | |
Quote:
I fail to see why standard auras wouldn't work, though you haven't really elaborated on the application. |
| 06-14-2008, 07:46 PM | #7 | |
Quote:
Standard auras are boring (wow, I got a 10% bonus to movement speed, HOW ORIGINAL AND AWESOME!). Simple, effective, but too boring for my liking :P Currently, I'm planning to make an aura that adds a poisoning effect to nearby units (can't use Slow Poison, since I need it to work with damage detection system, and Slow Poison doesn't specifically register poison damage type, does it?), and for any other auras I may want. I'll try my add-remove dummy ability idea and see how that fares out (only problem I can imagine happening is that unit somehow retains the ability permanently) |
| 06-14-2008, 07:52 PM | #8 |
You should try using my ABuff system, it comes with an aura subsystem that makes triggering any kind of aura a piece of cake. |
| 06-14-2008, 07:54 PM | #9 |
Use a different buff for each level, then just store them in an array at the beginning of the map, like so: Trigger: |
| 06-14-2008, 07:56 PM | #10 |
Hmmm, I had never thought of that :P But that could end up being alot of buffs (depending on number of heroes and auras). Thanks for the idea though :) |
| 06-14-2008, 07:58 PM | #11 |
It's the only sane way to do it. Unless you wanted to trigger all your custom auras. |
| 06-14-2008, 08:05 PM | #12 | |
Quote:
My plan involved: 1) Pick every unit with the aura ability (the aura ability being a modified version of some normal WC3 aura) 2) Pick every unit in (aura range) of the #1 3) Add a dummy ability to the unit for 4 to 5 seconds 4) If #2 no longer has the aura's buff, remove ability in #3 5) Whenever #2 takes or deals damage/does something and has #3, the aura's effect will proc. Sounds alot simpler than I had previously thought when I put it that way ![]() |
| 06-14-2008, 09:37 PM | #13 | |
Quote:
Wait, but it should at least give a value of 1, right? That's how you check if a unit has a buff, you make sure it's over 0. |
| 06-14-2008, 09:40 PM | #14 |
It returned 0 for me :\ I'll try it again tomorrow, since it's pretty late and I'm too tired to mess around in WE. But ye, that's how buffs should be detected according to JASScraft JASS:function UnitHasBuffBJ takes unit whichUnit, integer buffcode returns boolean return (GetUnitAbilityLevel(whichUnit, buffcode) > 0) endfunction |
| 06-14-2008, 10:44 PM | #15 | |
Quote:
|
