• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to make a spell target only Tauren-type units?

Status
Not open for further replies.
Level 8
Joined
Dec 16, 2007
Messages
252
Give a all tauren units a special classification. Then add that classification to targets allowed of the spells. Not sure if that would work.

Or use triggers which I suggest. Give all tauren a special ability, and when a unit cast a spell, check if the targeted unit got the ability, else don't do anything.
 
Level 8
Joined
Dec 16, 2007
Messages
252
And before you answer "go to targets allowed", it isn't there

There ARE no Tauren in targets allowed, that's why I suggest him to give a special classification in it.

I looked, and I do know there are no tauren in targets allowed. What I mean is like, if he don't have any air units in his map, he can give flying classification to all tauren units and later make thoose abilities to only work with air.
 
Level 14
Joined
Jul 27, 2007
Messages
793
There are 4 other classifications : Giant, Undead, Ancient and Mechanical. From that I can rename by the gameplay constants menu. Debris, Trees and other won't show under unit's name. So I have to use Tauren. The other will be used.

My question was to see if there's a way through the OE, but it seems after all that I have to use triggers. I hate using dummyspells. All I needed was a simple "charm" made for taurens only, bu-u-ut... whatever. Thanks, however.

PS: If somebody can proove us wrong and show a way through the OE, don't wait. Please. :D
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
Infernal is on the right path, its just that none of you understand

Tauren is not in the Targets Allowed(i think), but there are some that are like never used, like Suicidal, Bridge, Invulnerable

just change all the Taurens to be Targeted as Bridge or something like that, and then change the spell to only target Bridge
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
There ARE no Tauren in targets allowed, that's why I suggest him to give a special classification in it.

I looked, and I do know there are no tauren in targets allowed. What I mean is like, if he don't have any air units in his map, he can give flying classification to all tauren units and later make thoose abilities to only work with air.

I'm pretty sure he needed the tauren EXACTLY for that reason... because all other classifications are already used for similar reasons
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You can try to add a condition
  • (Unit-type of (Target unit of ability being cast)) Equal to Tauren
The bad side is that this will still cause the ability to be cast (and thus drain mana), but won't have any effect. It's the best solution I can think of.
 
Level 13
Joined
Jul 3, 2008
Messages
1,098
if you want then make abbility like not manacost when target is tauren then i have solution
event:
unit begins casting abbility
condition:
abbility being casted equal to charm
(Unit-type of (Target unit of ability being cast)) Equal to Tauren
action:
your actions...
set mana of casting unit to mana of (casting unit) + (manacost of charm)
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You made a little mistake there. You best make 2 If/Then/Else Actions like this
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Target unit of ability being cast)) Not equal to Tauren
      • Then - Actions
        • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 0.00)
      • Else - Actions
        • Do nothing
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Target unit of ability being cast)) Equal to Tauren
      • Then - Actions
        • <YOUR ACTIONS>
      • Else - Actions
        • Do nothing
You accidentally made a trigger that would not work if the targeted unit was a Tauren. This trigger (based on numerion's idea) should cause your ability to take effect when it is cast on a Tauren, but will do nothing when it is another type of unit.
This will still allow the player to cast the ability, but all effects should be neutralised.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Avator, pretty useless to check for the same condition twice. In the case a unit is a tauren, then the unit will not "not be" a tauren... You could simply use the "else - actions" part of your if/then/else statement.

For instance:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Target unit of ability being cast)) Equal to Tauren
    • Then - Actions
      • <YOUR ACTIONS>
    • Else - Actions
      • Increase mana by spellcost
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You can add to both Eleandor's and my trigger (it's not much of a difference) the Action 'Unit - Reset Ability Cooldowns'.

The problem is that this will recharge all abilities of the unit. If you want to prevent this, you will probably have to ask for a JASS command.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
JASS is the advanced way of triggers. The trigger you use are GUI (don't remember what it stands for anymore though, maybe someone else can answer that question). They are actually made by JASS. JASS is the programming language used by Warcraft III. So if you can't do it with JASS, then it is not possible. JASS is the very base, but a lot more complex then GUI triggers. with JASS you really type out the entire command. Some people know this programming language, and others don't bother to learn it. You can get pretty far with GUI triggers, but sometimes (at moments like this) you have to insert a JASS part if GUI triggers don't go that advanced.

But don't think everything is possible with JASS. It still has it's limitations. That's why you will have to ask someone who knows about JASS if it's possible, and if so: Ask him/her to make a JASS command for you. (It is usually common manners to mention the person helping you with big JASS problems in your credits :wink:)

I have browsed some for you and I passed this thread which has something in common with your problem. And if I may believe Daelin in this thread, there is something about it in the FAQ.


I think that removing and adding the ability again is probably the best option if there is no JASS for this issue. You just have to make a few more actions after 'Unit - Add Ability' to set the ability level to the same it was when the ability was cast. It's getting too late here, so I'm not bright enough to think of an exact trigger for this for the rest of the day :gg:

Maybe you can find anything in the links. Good luck :wink:
 
Status
Not open for further replies.
Top