| 01-21-2006, 06:18 AM | #1 |
I want an item that gives 1 point of mana per second, the heros normally have no mana regen so % increase will not work. Brilliance doesn't stack also because i want it so u can hold more than 1. I was thinking of a forloop but that is messy because i have many unit replacements. Would the best way to make this is to make a for-loop and detect the number of items after it switches and start the loop again? |
| 01-21-2006, 06:44 AM | #2 |
I'm guessing you'd want to make a reoccuring trigger by 1 second. Then any unit that owns the item you want to add mana = mana + 1 to their mana property. I'm pretty sure the trigger will thread itself to each unit so you can just use "triggering unit". |
| 01-21-2006, 06:45 AM | #3 |
Here is some pseudocode for jass trigger which does it with locals. Trigger: Event: hero takes item Conditions: item is mana regen item Actions: store item in local store hero in local set integer i = 0 loop exit when i==1 if hero has item add 1 mana to her else set i=i+1 wait 1 second endloop |
| 01-21-2006, 07:54 AM | #4 |
incase you didn't realize, this is a yes or no question |
| 01-21-2006, 09:21 AM | #5 |
Ah. Sorry. I should have just said "no" without providing you with the answer to an inevitable followup of "what is the best way" My bad :) |
| 01-21-2006, 09:34 AM | #6 |
There are probably as many solutions to this as there are people. I would say, every 1 second, loop through all th units with an inventory, check all item spots in each unit's inventory and add one mana for each item spot occupied by your item. |
| 01-21-2006, 05:25 PM | #7 |
ok, i was just confirming what i had in mind, i thought there maybe was an ability or something that can duplicate this |
| 01-21-2006, 05:25 PM | #8 |
ok, i was just confirming what i had in mind, i thought there maybe was an ability or something that can duplicate this |
| 01-21-2006, 05:25 PM | #9 |
ok, i was just confirming what i had in mind, i thought there maybe was an ability or something that can duplicate this |
| 01-21-2006, 05:45 PM | #10 |
Don't triple post. |
| 01-21-2006, 05:47 PM | #11 |
Nice triple post.. Maybe base an ability off mana fountain? I dunno if that would stack though. Maybe a negetive mana draining immolation spell. or, you could always make a brilliance aura with 6 levels and level it up each time they pick up a mana regen item Edit: Tested it out, base an ability off "Mana Regeneration (Neutral)", uncheck Percentage and increase it from 0.01 to whatever you want, give it to an item and each item picked up will increase the unit's mana regeneration. There is a tiny problem with this, and that is that mana regen continues for a few seconds after the item is dropped. |
| 01-21-2006, 05:51 PM | #12 |
lol.. thats not my fault, my thing froze at the point where i click submit and i clicked it 3 times... someone close this thread, i dont need anymore suggestions |
