• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Need help detecting the level of abilties and using the spell according to the level

Status
Not open for further replies.
Level 6
Joined
Jun 14, 2008
Messages
176
(The actual question that I have is the bolded part below)

So I want to make a spell based on breath of fire.

I want to make it have 2 functions, it damages enemies AND heals allies.

To do this, I'll use items as the dummy and force the hero to use it.

I'll also make the "base ability" do nothing at all but allow it to target both "friends" and "enemies".

The item will be perishable, one item will have the Breath of Fire that heals, the other will be the one that damages.

Both items will be given to the hero and both be used at the same time. Not sure if this will actually work as intended though but I have tried using items for other custom spells(just not 2 at the same time).

Example:
  • BreathofFireHeal
    • Events
      • Unit - Hero Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BreathofFireAbility
    • Actions
      • Hero - Create BreathOfFireHeal and give it to (Triggering unit)
      • Hero - Hero to use (Last created item) on (Target unit of ability being cast)
      • Hero - Create BreathOfFireDamage and give it to (Triggering unit)
      • Hero - Hero to use (Last created item) on (Target unit of ability being cast)
The question is, how do I make the trigger detect the level of the ability being cast, and make it cast the appropriate item(which has the appropriate ability for the appropriate level of the spell).

For example - if the ability has 4 levels. Since the actual "base ability" itself does nothing, and it's the item that does the actual effect, there needs to be 4 items, one for each level.

I don't know how to make the trigger detect the level of ability.


Also another question, instead of having to use "4" separate abilities for 4 levels, is it possible just to make it just 1 ability with 4 levels and somehow make it detect the actual level and use that level?

I noticed that some JASS spells do that. So if the trigger does have to use some JASS, that's fine also.

Anyway, if anyone can tell me how to make a trigger detect the level of the ability being casts so that it makes the trigger use the appropriate ability, thanks.
 
Level 6
Joined
Jun 14, 2008
Messages
176
Thanks everyone, I managed to make the trigger but now another problem shows up.

It seems that for some reason, spells like Shockwave, Breath of Fire/Frost, Crushing Wave, etc can't seem to affect friendly units for some reason.

Even though I have it checked to "air, ground, friends" it only affects enemies still.

It only lets me target "friendly" units but it doesn't actually affect them. If I try to target an enemy directly with the ability, it says "cannot affect enemies", but it only affects the enemy despite that.

I want a "cone"(Based on breath of fire) based healing spell but it doesn't affect "friends" or player own units, or allies, etc, it only affects enemies despite the fact that I have it checked to "friends" only.

Anyone have any ideas on how to fix this?
 
Status
Not open for further replies.
Top