Thursday, April 12, 2012

Autocast ability not triggering event

[:1]Heyho!

I'm currently working on my first real Warcraft Map (an arena-like trigger map) and am experiencing a problem with my triggers.

The situation: I have an attack ability which works with a trigger. If you cast it on sb., you attack him and then randomly you, the enemy, or both die (this is simplified to keep the situation easy to understand). This ability is based on the fire arrow ability from the night elves, but I use it as a melee ability (range 250, same as the unit's range). The ability and the trigger are working just fine.

Now I chose the fire arrows ability, since I wanted the player to be able to autocast it. At the moment, the player can put the ability on autocast and it is used on every strike (the mana of the unit is decreasing with every strike). The problem is, that I cannot respond to this kind of use with the trigger. This use does not trigger any event like "A unit begins channeling an ability" and those things.

Any suggestions on how to solve this? I'm using both JASS and graphical triggers, so there are no restrictions on this one (except that I don't really want 500 lines of JASS code just for this autocast).|||Quote:






View Post

Heyho!

I'm currently working on my first real Warcraft Map (an arena-like trigger map) and am experiencing a problem with my triggers.

The situation: I have an attack ability which works with a trigger. If you cast it on sb., you attack him and then randomly you, the enemy, or both die (this is simplified to keep the situation easy to understand). This ability is based on the fire arrow ability from the night elves, but I use it as a melee ability (range 250, same as the unit's range). The ability and the trigger are working just fine.

Now I chose the fire arrows ability, since I wanted the player to be able to autocast it. At the moment, the player can put the ability on autocast and it is used on every strike (the mana of the unit is decreasing with every strike). The problem is, that I cannot respond to this kind of use with the trigger. This use does not trigger any event like "A unit begins channeling an ability" and those things.

Any suggestions on how to solve this? I'm using both JASS and graphical triggers, so there are no restrictions on this one (except that I don't really want 500 lines of JASS code just for this autocast).






Okay I've read all of this multiple times and I keep coming to the problem of not knowing your full problem. Tell if my dumbing it down is on the right track.

1) You have an auto-cast skilling (based off flaming arrows) except its melee range.

2) You want this ability to trigger what exactly? (or what do you intend to use this ability in triggers).

3) If you state what your going to be using the trigger for, it might make it a bit easy?|||OK second try:

I have the ability, let's call it "Suicide Attack". The casting range is 250 (as is the attack range of the hero using it). If you cast the ability on someone (trigger event: EVENT_PLAYER_UNIT_SPELL_CAST, A unit begins casting a spell), the trigger fires and takes a random number from 1 to 3. If the number is 1, the enemy dies. If the number is 2, both units die. If the number is 3, only the caster dies.

This works fine.... unless you put the ability on autocast. If the unit is autocasting the ability, it loses mana with every hit, but the trigger is not executed (thus, nothing happens). Technically: The ability is cast, but the event is not recognized.|||I don't think you will be able to trigger it using auto-cast. I suspect you will have to do something a little more complex, like make it function like a passive but turn on and off when the auto-cast status is changed. This might create other issues if you actually wanted it to be castable apart from auto-cast, though.

I'm a little confused how that ability is really beneficial to the caster, though - unless the percentages you gave were just for example. It seems like an ability that is situationally-useful to the user only when they are close to death already or pitted against an opponent that they are seriously overmatched against or something like that.|||Thanks a lot, now at least I know there's no use in trying further.

The numbers were just for example. If you're interested: The heroes using this abilities are to protect another hero and can use this to take out an enemy by (probably) sacrificing themselves. It's a hero ability which has 3 levels, the last one has a 100% chance of killing both you and the victim.

This makes sense since it's taken from a real sport and there's a significant need for this behavior ;)

But you can see it yourself when the map is finished :)|||Hi im alton

Yo! I am currently working 650-251 on a project called " and Humans Remade" in the World Editor of III. We are using the 642-972 classic rules (Peon mines 100 gold from the mine, or 100 wood from a tree, Gold/Lumber Costs in classic "style", Unit health 70-236 and damage etc.Yo! I am currently working on a project called " and Humans Remade" in the World Editor of t III. We are using 70-450 the classic rules (Peon mines 100 gold from the mine, or 100 wood from a tree, Gold/Lumber Costs in classic "style",

No comments:

Post a Comment