• 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.

[Trigger] Need help with spell canceling

Status
Not open for further replies.
Level 4
Joined
Jul 25, 2007
Messages
68
Hello I'm currently facing aproblem with my Guildwars arena map I need to make it to where every spell is interuptable, meaning, lets say if you're a warior and you need a certain amount of adrenaline to use one of your sword attacks, how do I make it cancel the ability if you don't have enough adrenaline? Also there will be spells that are easily interupted that means if you take dmg at all while casting it it is interupted and there are spells that interupt other spells.

any help I'd greatly appreciate as this would be my 2nd map I've actually made and it's going to be 10 times harder to make then my dofus map.
 
Level 2
Joined
May 1, 2007
Messages
25
You can make the mana of the game to adrenaline and then just do that he regenerates 0.00 mana per sec (i think thats what u want to do...) and then when --- hits an enemy do ---'s mana + [number]

Or if u need the game to say "mana" for other heros, u can make the warriors spells cost nothing and then do triggers like this:

Event: A unit starts to cast a spell
Actions: (If, Then, Else) (If spell being cast = [dunno]) AND (owner of casting unit have less then [number] adrenaline), order casting unit to stop and send messege "You don't have enough adrenaline for that move"

Adrenaline is an integar varibale


For your second problem u can maybe do a varibale that will indicate when your hero is casting a spell like

Event: a unit starts casting a spell
Conditions: triggering unit is RedHero
Actions: Set HeroCasting[1]=True

And then second trigger would be

Event: a unit stops casting a spell
Conditions: triggering unit is RedHero
Actions: Set HeroCasting[1]=False

And third trigger thats what u wanted would be

Event: a unit gets hit
Conditions: triggering unit is RedHero
Actions: (If,Then,Else multiple) If (HeroCasting[1]=True), Then (Stop RedHero), (Set HeroCasting[1]=false), (messege player 1 - Spell Disturbed)

RedHero is a Unit varibale
HeroCasting is a Booelon Harray


I think something like that should work
 
Last edited:
Level 3
Joined
May 28, 2007
Messages
57
  • Event: a unit gets hit
  • Conditions: triggering unit is RedHero
  • Actions: (If,Then,Else multiple) If (HeroCasting[1]=True), Then (Stop RedHero), (Set HeroCasting[1]=false), (messege player 1 - Spell Disturbed)
This would not be a very good idea because the trigger you have just said would not works like you think, because if for example your hero is casting a spell and a enemy player is issued an order to attack your hero (even if he is very far away) it will activate the spell disturbed trigger you will need an attack detection system in order to make an accurate trigger (so it will only activate when he really get's attacked).
 
Level 3
Joined
May 28, 2007
Messages
57
It is not bugged and it's just as it says
  • Event: A unit is issued to attack this unit
which means the trigger will activate as soon as someone is issued the order to attack the unit, I hate to say it but a good example of this is Axe from DotA even if he is not really attacked and only is issued an order to attack him he has that chance to spin, and thats why I said it would be better with an attack detection system.
 
Level 4
Joined
Jul 25, 2007
Messages
68
I figured it out guys thanks though, but I'll ask this, to stop units from casting spells would thew stop command work? or cancell? I thought I saw somewhere it saying that won't work.... what i ment by the 2nd thing I said wasn't aproblem I was just explaining what I'll need the interuptions for...
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
And why exacly should that happen ?

If what you say is true then triggers are bugged because you said its LIKE

Event: A unit is issued to attack this unit

and I did that it will happen when this unit will actualy get HIT by something

You mind reading what I said ?

The event I told him to do was "Unit is ATTACKED" = someone hits him.

I said "A unit is issued to attack this unit" as an example for what you are saying :bored:
 
Status
Not open for further replies.
Top