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

GUI Spell Request

Status
Not open for further replies.
Hello guys,

I would be grateful if you could please take a look at my spell request.

The spell goes like this:
1- A unit casts the ability called "Madness" on a targeted enemy unit.
2- The targeted unit will be afflicted with a buff named "Madness"
3- The buff lasts 5 seconds. (This should be configurable in the object editor. It might differ between heroes and units).
4- The buff can be dispelled. (It is very important that the effect of the spell is related to the existence of the buff)
5- The afflicted Unit will be forced to attack a random allied nearby unit (in a 600 AoE range) as long as the buff is still in place.
6- If there are multiple allied units nearby it, The afflicted Unit will be forced to attack a random allied unit every time until the buff disperses. (The afflicted Unit will prefer to attack the closest target, if the initial target moves away and another unit becomes closer to it, then it will attack the closest target without having to chase the first target)
7- The player will still be in control of the afflicted unit, meaning it needs not to change owners, and when the player clicks on the afflicted unit, it will respond but the player won't be able to issue it any orders until the buff disperses.
8- If the unit gets afflicted with the spell and there are no allied units nearby, it will randomly attack nearby enemy units but the player won't be able to issue it any orders until the buff disperses.
9- The owner of the afflicted unit, won't be able to issue it any orders until the buff disperses meaning he can't stop the unit, move it, order it to attack or to cast spells.

The spell should be in GUI, leakless and it is preferable if it's an optimal solution and without the need to install any other systems (like Damage detection etc).


Please let me know if there are any difficult parts that need to be changed or removed.
Thank you guys. :aht:
 
Last edited:
Level 28
Joined
Feb 18, 2014
Messages
3,576
I think the best way you can achieve this is by giving the afflicted unit the Locust ability or the "ward" classification (I dont recommend the latter since the player can still order that unit to move when he right click on it). Here's a small example on how it should be :
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast Equal to Madness.
  • Actions :
    • Set MyUnit = Target unit of ability being casted
    • Set TargetPosition = Position of MyUnit
    • Unit - Order MyUnit to attack Random unit from unit within 600 range of TargetPosition matching Matching unit belongs to an ally of Owner of MyUnit equal to True or Matching unit belongs to an enemy of MyUnit equal to true
    • Custom script : call RemoveLocation (udg_TargetPosition)
 
I think the best way you can achieve this is by giving the afflicted unit the Locust ability or the "ward" classification (I dont recommend the latter since the player can still order that unit to move when he right click on it). Here's a small example on how it should be :
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • Ability being cast Equal to Madness.
  • Actions :
    • Set MyUnit = Target unit of ability being casted
    • Set TargetPosition = Position of MyUnit
    • Unit - Order MyUnit to attack Random unit from unit within 600 range of TargetPosition matching Matching unit belongs to an ally of Owner of MyUnit equal to True or Matching unit belongs to an enemy of MyUnit equal to true
    • Custom script : call RemoveLocation (udg_TargetPosition)

Hello Warseeker,
Thank you for your time but this has nothing to do with what i've requested. The simple trigger that you posted represents like 5% of what i've requested (Mainly a part from "3rdly", missing the other 8 parts) (Think of it as the difference between the spell Taunt and Berserker's Call from Dota). :)

Please guys if you could provide a complete spell with an attached map it would be great (this is the request section not the WE section :p )
 
Status
Not open for further replies.
Top