is it posible to allow any attack (or any dmg) to Interrupt a spell cast?
I'm atm working on a spell to get units off the battlefield. the spell has a 5 sec cast and the cast bar etc will display.
the only thing I'm not able to create is that if the unit is attacked that the cast Interrupts.
anyone has an idea on how to achieve this effect?
I'm trying to let an ability be interrupt by any dmg when its cast.
don't care if its a data or trigger solution. anything will do as long as it works.
Still your best bet, though... you could add a behavior to the casting unit for the cast duration. In this buff you modify the damage response to apply a 0.01 sec stun buff (or buff, which just disables the casting ability) on the source unit. An issue Stop Order effect should work as well.
k. that works.
not 100% necessary but would be a plus if someone knows.
how to remove the behaviour if the unit interrupts the casting by move order or something? (player moves unit or stops the casting in a other way)
I love the data editor. I really do. There's little I find that it can't do, but this, I've yet to find a solution.
I've found a decent(ish) solution, though. Make a behaviour. Give it a damage responce. Make the damage responce "Handled" effect be an Issue Order effect. The Issue Order effect's order is simply "Stop".
If the unit has this behaviour, any time it is attacked, it will stop. This will stop movement or casting. There's no way I've found to apply a behaviour at the cast start, but you can do this using triggers. Just ensure you remove the behaviour after the cast too or if the cast is cancelled, because as I said it will also cancel move orders. There might be a better solution using validatiors, I'll take a look later.
Just got an idea for a no-trigger solution: Give the unit the behavior to stun or stop itself when damaged right away and add a disable-validator, which checks, if the current order of the unit is the desired spell. Basically the buff is always disabled and only active when casting the spell. Would fix the remove-when-cancel thing as well.
Off topic, yes but she said she loved the data editor. So if she loved it so much surely she would not mind answering a little question. :) I knew it probably wasn't hard, but I have serious trouble with the data editor.
Click "Abilities+", I'll use Psi Storm here. Give your unit the Psi Storm ability, press P on the dropdown to cycle to the P section and search for it there.
Next click "Commands+", just beneath Abilities+. Select the tab you want the ability to appear in. If there's already an ability there, click on it. It will appear in a box below the command card tab. Just hit delete and it's gone. If you're wanting to use a fresh slot, click it and then look at the box beneath. There will be a green X sign. Press that. You'll add the new element, and be prompted to select a button for your ability first. Search for "Storm" and hit Psi Storm button.
Next, the 4 boxes beneath will light up. Ignore the first 2. The 3rd box down has a drop down menu. Open that up, and Psi Storm will be there. Press that. The 4th box should automatically convert to Psi Storm too, but if it doesn't, then add it manually. It should be the only option anyway.
Just got an idea for a no-trigger solution: Give the unit the behavior to stun or stop itself when damaged right away and add a disable-validator, which checks, if the current order of the unit is the desired spell. Basically the buff is always disabled and only active when casting the spell. Would fix the remove-when-cancel thing as well.
I had that in mind the first time I tried. but never got the validator to work. so far I know there is no way to check if the unit is casting a spell (no working option anyway)
atm i got it working like:
click the ability -> adds behaviour (casting weakness) for 7 sec + start cast taking 7 sec
the behaviour has a damage response to start an effect
the effect adds a 2 sec stun behaviour + removes the casting weakness
the only thing i'm kinda missing (to make it perfect) is to remove the casting weakness if the casting player interrupts the cast.
Validators are kinda weird. Make sure you try "Unit is NOT casting <ability>" too, because for some reason you need to use opposites at times for them to work.
Have a look at the CanCharge (unnamed) - validator for reference. It "returns" true, whenever a unit is using the attack ability. Its of Unit Order Target- Type and lets you pick a specific ability.
Disable-validators for behaviors need to be true for the behavior to work, if they are false, the behavior is disabled.
Have a look at the CanCharge (unnamed) - validator for reference. It "returns" true, whenever a unit is using the attack ability. Its of Unit Order Target- Type and lets you pick a specific ability.
that one works like a treat. thanks:P
think that makes this whole topic Solved
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
is it posible to allow any attack (or any dmg) to Interrupt a spell cast?
I'm atm working on a spell to get units off the battlefield. the spell has a 5 sec cast and the cast bar etc will display. the only thing I'm not able to create is that if the unit is attacked that the cast Interrupts. anyone has an idea on how to achieve this effect?
Hopeful bumb
stun the unit for 0.01 seconds?
that might work.. will test
k. hoping someone has a better solution.
I'm trying to let an ability be interrupt by any dmg when its cast.
don't care if its a data or trigger solution. anything will do as long as it works.
Hopefull Bumb
Still your best bet, though... you could add a behavior to the casting unit for the cast duration. In this buff you modify the damage response to apply a 0.01 sec stun buff (or buff, which just disables the casting ability) on the source unit. An issue Stop Order effect should work as well.
k. that works.
not 100% necessary but would be a plus if someone knows.
how to remove the behaviour if the unit interrupts the casting by move order or something? (player moves unit or stops the casting in a other way)
make a remove validator which checks for the current order or something.
I love the data editor. I really do. There's little I find that it can't do, but this, I've yet to find a solution.
I've found a decent(ish) solution, though. Make a behaviour. Give it a damage responce. Make the damage responce "Handled" effect be an Issue Order effect. The Issue Order effect's order is simply "Stop".
If the unit has this behaviour, any time it is attacked, it will stop. This will stop movement or casting. There's no way I've found to apply a behaviour at the cast start, but you can do this using triggers. Just ensure you remove the behaviour after the cast too or if the cast is cancelled, because as I said it will also cancel move orders. There might be a better solution using validatiors, I'll take a look later.
Would you mind explaining the right way to add abilities to a command card? If that makes any sense.
Just got an idea for a no-trigger solution: Give the unit the behavior to stun or stop itself when damaged right away and add a disable-validator, which checks, if the current order of the unit is the desired spell. Basically the buff is always disabled and only active when casting the spell. Would fix the remove-when-cancel thing as well.
little off-topic? ;)
Add the ability to the unit, open command card, add a button, select ability command, select desired ability. Not that hard :D
@Kueken531: Go
Off topic, yes but she said she loved the data editor. So if she loved it so much surely she would not mind answering a little question. :) I knew it probably wasn't hard, but I have serious trouble with the data editor.
Sorry for taking this offtopic, but yeah.
Click "Abilities+", I'll use Psi Storm here. Give your unit the Psi Storm ability, press P on the dropdown to cycle to the P section and search for it there.
Next click "Commands+", just beneath Abilities+. Select the tab you want the ability to appear in. If there's already an ability there, click on it. It will appear in a box below the command card tab. Just hit delete and it's gone. If you're wanting to use a fresh slot, click it and then look at the box beneath. There will be a green X sign. Press that. You'll add the new element, and be prompted to select a button for your ability first. Search for "Storm" and hit Psi Storm button.
Next, the 4 boxes beneath will light up. Ignore the first 2. The 3rd box down has a drop down menu. Open that up, and Psi Storm will be there. Press that. The 4th box should automatically convert to Psi Storm too, but if it doesn't, then add it manually. It should be the only option anyway.
I had that in mind the first time I tried. but never got the validator to work. so far I know there is no way to check if the unit is casting a spell (no working option anyway)
atm i got it working like:
click the ability -> adds behaviour (casting weakness) for 7 sec + start cast taking 7 sec
the behaviour has a damage response to start an effect
the effect adds a 2 sec stun behaviour + removes the casting weakness
the only thing i'm kinda missing (to make it perfect) is to remove the casting weakness if the casting player interrupts the cast.
Validators are kinda weird. Make sure you try "Unit is NOT casting <ability>" too, because for some reason you need to use opposites at times for them to work.
Have a look at the CanCharge (unnamed) - validator for reference. It "returns" true, whenever a unit is using the attack ability. Its of Unit Order Target- Type and lets you pick a specific ability.
Disable-validators for behaviors need to be true for the behavior to work, if they are false, the behavior is disabled.
that one works like a treat. thanks:P
think that makes this whole topic Solved