| 07-13-2004, 11:38 PM | #1 |
ive been experimenting with using triggers to count the number of times a spell is used, and then grant the unit a more advanced level of the spell if the spell us used x number of times. the problem is i cant seem to get it to work properly, because either the trigger seems to work only once, or it keeps granting the the level 2 spell to the unit over and over. also, is there a way to use the same trigger for more x number of units with the same spell, and if so, can i use the spell for different unit types? |
| 07-13-2004, 11:48 PM | #2 |
Im not completely sure what your asking but of what i understand i think all you should do is : Event: A unit begins casting an ability(or a unit starts the effect of an ability) Condition: Ability being cast = Whatever Action: if: level of ability of whatever for casting unit = 1 then: numberoftimesused = numberoftimesused +1 else: if: level of ability of whatever for casting unit = 2 then: numberoftimesused = numberoftimesused +2 Else: You get what im doing If you want it to change the level of that ability then instead of making the rate of numberoftimes used change, make stay as add one but you add an additional trigger to each then action. For example for the if statement checking for if the level is 1: if: numberoftimesused <= 4 (or whatever is 4 times the level your are checking for) then: set level of hero ability whatever to 2 (or whatever is 1 plus the level you are checking for) else: donothing Basically it records the amount used so you can use this for like the amount of summons or something. Also, with each level up of the ability, it gets stronger quicker. Hope this helps. If this is not what you wanted post back OR: You could just make like a different level version of the spell each time like a level 1 of that spell, a lvl 2 of that spell, a lvl 3 of that spell, etc and just check the number of times used and if it matches, just remove the old ability and add the new. ~HarshaTeja~ |
| 07-16-2004, 03:15 AM | #3 |
this looks pretty close but is is possible to evaluate the number of times the spell is used then, when the unit has used the spell 4 times, grant him the level 2 of that spell, instead of relying on the actual level of that hero to purchase the spell with hero points. that way, the hero can have a spell at level 6 when the hero itself is only at level 4. |
| 07-16-2004, 03:17 AM | #4 |
wait nevermind, im slightly reterded. i think ive got it figured out. i didnt under stand the "if: numberoftimesused <= 4 (or whatever is 4 times the level your are checking for) then: set level of hero ability whatever to 2 (or whatever is 1 plus the level you are checking for) else: donothing" do i have to set up some sort of counter for this to reference? |
| 07-16-2004, 09:48 AM | #5 |
Well, if you want this to work for multiple units, then I suggest you use custom values for this. Code:
Events:
A unit starts the effect of an ability (do not use "begins casting", players could abuse that to get levels quickly)
Conditions:
Ability being cast equal to Levelable ability
Actions:
Set (custom value of casting unit) to ((custom value of casting unit) + 1)
If - then - else multiple functions
If - conditions:
(custom value of casting unit) = 4
Then - actions:
- upgrade the ability -
Else - actions:
do nothing |
