• 🏆 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!

[Spell] Base abilities that cannot be cast when unit is already affected by it?

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi guys,

I want to make a spell which cannot be cast on a unit, if the unit is already affected by the spell. I could probably add this condition via trigger, but I figure it's more efficient if I use a default ability in WC3 which cannot be cast on a target, if the target is already affected by the spell.

The only problem is... are there such abilities? Google didn't help and I don't know any spells that behave like this from the top of my head.

Cheers!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
I don't see the issue with using triggers. Pretty simple and bug free to do something like this:
  • Slow Example
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(slow))
      • ((Target unit of issued order) has buff Slow) Equal to True
    • Actions
      • Unit - Order (Triggering unit) to Stop.
Also, and I didn't test this, but you could probably change the Stop order to instead Order the caster to use a hidden ability that throws an Error.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
Thanks you two!

@Uncle : I thought about giving a stop order + sound effect. But a hidden ability which displays an error would ofc be better. What hidden ability would do that though?
I'm not sure if it even works this way, but wouldn't an ability with it's Targets Allowed set to None always give an error? Or maybe set it so it can only target Suicidal units or some classification that you'll never use.

Then you could even edit the Error text in the Gameplay Interface to have a proper Error message.
 
Status
Not open for further replies.
Top