HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ability Level comparison in triggers?

08-25-2003, 06:50 PM#1
HalfSlothNCamel
I am trying to make a summon spell that as it progresses summons different units. The spell Raise Dead would have been perfect except for the fact it has to target a corpse (yes I tried changing the targets allowed but it still said "there are no usable corpses nearby". So I thought about using Dark Portal, but its too random to suit my purposes.
My question then is; How can I check a heroes ability level using triggers?
I want the summon set up like so:
Level 1:1 of Unit A
Level 2:1 of Unit A. 1 of Unit B
Level 3:1 of Unit A, 2 of Unit B
Level 4:1 of Unit C, 1 of Unit D
Level 5:1 of Unit C, 2 of Unit D
But I cant figure out how to do that with triggers, since I cant find any comparison for the actual level of the ability.
Thanks in advance.

P.S. If anyone can also tell me how to get around the needing corpses problem for raise dead that would be nice as well.
08-25-2003, 07:20 PM#2
MarSara
If this is a hero ability, why not create a trgger, that whenever he usues a skill point on the ability (learns it), set a varaible to Event Response - Learned Ability Level then just use that varaible to see what level the ability is. The only problem with this is you will have to wait until the next patch before this will work properly (as of now, it doesn't return the correct level for ability over 3 levels)
08-25-2003, 07:28 PM#3
Draco
Just use this....

Event - Player - A h\unit learns an ability

Condition - Ability Learned Equal to [???]

Action - Set Variable "SpellInt" to (SpellInt+1)

- - -

That integer will keep track of the exact skill level as long as the int. starts at 0.
08-25-2003, 07:29 PM#4
HalfSlothNCamel
Thats the thing is I cant define what skill I want to make the check on. Because any of the learned ability functions only represent the default abilities, and none of the custom ones I have made. I hate to ask for hand-holding but im fairly trigger inept, (but learning fast). Would it go something like this? If not could you give me an outline on how the trigger structure would be set up?
Event:
Unit-A unit Learns a skill
Condition:
(Learned skill level) Equal to 1
Action:
Set buildTVar = 1
The problem with the above is that there is no way to define what ability it is checking.
I may just have to use the first solution, since there is a bug with this one, but I still need to know how to do this for later.
08-25-2003, 07:45 PM#5
Freezer[TBP]
You can also use Water Elemental or The Far Seer's wolves. Just make your custom units, rename everything that you need in the ability and make it make those custom units instead. I've done it myself.
08-25-2003, 07:49 PM#6
HalfSlothNCamel
That only works for changing the number of units per cast, the type of unit each level. That doesnt work when you want to summon 2 different types of units at the same time. I could do that and use a unit-enter region trigger for the other units I want to summon, but thats a problem as well because I want to summon a different number of units each level, so Im back to my beginning problem.
08-25-2003, 09:02 PM#7
Newhydra
You could also use the portal spell thing that archimonde (I think) has...the one that summons fel beasts and demons...
08-25-2003, 09:32 PM#8
HalfSlothNCamel
Thats Dark Portal, which I referred to earlier. It summons a certain number of units, but they are random. So instead of summoning(building) the transport and its two defenders, I could summon 3 transports, or 3 defenders, or any mix thereof, which isnt what I want.
08-25-2003, 11:34 PM#9
Newhydra
What about Item Doom Guard Summon?
08-26-2003, 12:55 AM#10
HalfSlothNCamel
Newhydra I could kiss you. That works perfectly for this spell.
Though my earlier question for MarSara remains, since I would still like to know how to do what he said for future referance.
Again thanks a ton Newhydra.
08-26-2003, 02:04 AM#11
MarSara
Here's how to get the current level of a ability at any given time:
Code:
Events:
    - A Hero Learns a spell
Conditions:
    - (Leared Spell) == <Ability> (ability comparison)
Actions:
    - set Varaible (integer) = EventResponse - Learned Spell Level
Then just use [Variable] whenever you need the spell level.

You will have to repeat this trigger for every ability, that you want to keep track of. There is a way to keep track of the level of all abilities (in 1 trigger) but it's a rather complicated process, and I'll go threw it if you want me to.
08-26-2003, 03:38 AM#12
HalfSlothNCamel
Thanks for the response. I tried to make a trigger like you said but there are some inconsistencies that confuse me.

1: There is no A Hero Learns a skill event, just a unit learns a skill. I assume that is what you are talking about?

2: The Ability Comparison only does ability being cast, not learned spell. The one that does compare the ability being learned is Hero Skill Comparison. The problem there is that it only compares the default skills, there is no choice for any custom ones.

Those are the only questions that I have for now. Im sure the answer is just in front of my face, but Im not seein it. Also if you have the time, and the want to do so, even though I need hand-holding for this simple trigger, it'd be cool if you could show me the single tracking trigger.
08-26-2003, 04:00 AM#13
MarSara
Sorry, i didnt have my editor open at the time:

1) Your correct use A Unit Learns a skill

2) to compare for custom abilities, just convert to custom text then you will see a GetLearnedSkillBJ() == 'Axxx'. Just change the 'Axxx' to your custom spell code.
08-27-2003, 08:24 PM#14
INeedNoSalt
Is the customabilitycode the same as the base ability code? 'cause I needed to make a trigger using that same concept and looking at the code... it's listed as
A003:Aamk
and Attribute Bonus is listed as
Aamk

=\ So would a trigger using
if ( not ( GetLearnedSkillBJ() == 'Aamk' ) ) then
return false
check for the Attribute Bonus? Would I put 'A003:Aamk' instead of Aamk?
08-28-2003, 07:39 PM#15
MarSara
replace that with your 'custom ability code' that is always in the format 'Axxx' where x is either a number or a lowercase letter. In your case replace the ability code with 'A003'