HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Stat Bonus system problem

01-18-2009, 01:50 PM#1
silentshou
Hey guys. I ran into a problem trying to make a Stat Bonus system in which a hero would have a spell book in slot (2, 1) that opens up 3 skills which, when clicked, grants the hero Str, Agi, or Int using Lumber.

This is the way I tried to do it, and it's not working out:

Spell book contains 3 custom skills based on Fan of Knives: Str Up, Agi Up, and Int Up. I removed the animation model and MP cost for each.

The trigger for the stat gain goes like this:

Event:
Unit <Hero> begins casting an ability
Condition:
(Ability being cast) Equal to <Str Up/Agi Up/ Int Up>
Actions:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If:
(Owner of triggering unit current Lumber) Greater than 0
Then:
Player - Set (Owner of triggering unit) Current Lumber to (Owner of triggering unit current Lumber - 1)
Hero - Modify <Stat> of <Hero>: Add 1
Else:
<Message displaying to triggering player "Not enough Stat Points" -- I don't know how to send a msg specifically to triggering player>


My problem is, whenever I click on one of the 3 skills (Str, Agi, Int Up), it activates the trigger for all 3 simultaneously. I.e., if I click Str Up, I lose 3 Lumber and gain 1 to Str, Agi, and Int.

I tested around and it seems that the trigger is recognizing all 3 skills as the same one, because when I replaced Agi Up and Int Up with a different base skill (Starfall and Roar, respectively), the skills no longer activate all 3 triggers

Is there a way to do this with just 1 base skill? Is there a better way to do this system? I'm not sure if it's the triggers or a parameter of the skills that need altering. Any help would be much appreciated.
01-18-2009, 02:07 PM#2
Anitarf
It doesn't happen because your trigger would be recognizing all three abilities as the same one; rather, it occurs because all three abilities are cast simultaneously due to order id conflicts between them. The only wal to avoid that is to base the abilities on different base abilities (unless the base ability is channel for which you can alter the order id).
01-18-2009, 02:16 PM#3
silentshou
Thank you so much!
I think I'm not using channel right, however. I remade Str Up, Agi Up, and Int Up based on channel, but when I add them to the spell book, they do not show up.
01-18-2009, 02:59 PM#4
silentshou
Sweet. I figured it out... I just had to set the Visible checkbox under Data - Options. By the way, is it possible to set these abilities to display the Hero level-up effect without extracting the MPQ to edit the .slk file?
01-18-2009, 04:04 PM#5
Anitarf
Sure, just modify the appropriate spell art field in the object editor, something like art-target or art-caster.
01-18-2009, 10:30 PM#6
silentshou
I read PitzerMike's Ability Guide on Aher (Hero) and it seems that the ability utilizing the hero level-up effect isn't displayed in world editor normally, and in fact I couldn't find it in any of the dropboxes for Art - Effect. Is there any solution to this? Thanks.