| 12-20-2004, 02:32 AM | #1 |
Is there anyway to stop a character from blinking to a target location if they are in, or the target location is in a certain rect? I've tried this: Code:
Stop Transmit
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Blink
Actions
Set ITSpot = (Target point of ability being cast)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Does (Convert HBTC <gen> to a region) contain point ITSpot) Equal to True
(Does (Convert HBTCInvuln <gen> to a region) contain point ITSpot) Equal to True
(Does (Convert PvP Sun Rays <gen> to a region) contain point ITSpot) Equal to True
(Does (Convert selection <gen> to a region) contain point ITSpot) Equal to True
(Does (Convert The Map <gen> to a region) contain point ITSpot) Equal to True
Then - Actions
Unit - Order (Casting unit) to Stop
Else - Actions
Do nothingThat doesn't work, the unit still blinks, but I need a way to use this so that people cannot blink to restricted areas that their teamates are in. |
| 12-20-2004, 10:12 AM | #2 |
Guest | Save also the point of unit in a variable, and in actions put Unit - Move (casting unit) instantly to (original point). Salutions® |
| 12-20-2004, 01:50 PM | #3 |
I was under the impression that for a "If (All Conditions are True)" to fire, every condition you list must be true. So the blinking unit would have to blink into ALL those regions for it to make the unit stop. I could be wrong though, as I usualy seem to be. |
| 12-20-2004, 08:47 PM | #4 | |
Quote:
Ahh that could be one mistake, but I checked that and it still didn't work. Only thing I can think of is to set a duration on the ability, or maybe a casting time. |
| 12-20-2004, 10:27 PM | #5 |
what weird conditions do you use?!? why not just use boolean compare: region contains point...? And like said: add Or - multiple conditions. |
| 12-20-2004, 11:05 PM | #6 | |
Quote:
umm.... that IS the condition I use. |
| 12-20-2004, 11:33 PM | #7 |
You may try adding a short cast time, it sort of destroys the point of blink being a fast thing, but it could be the answer your trouble. Another thing is to do what Mara suggested, save the point of where the caster STARTS, and if he/she is blinking into a region just move the unit back to where they started. |
| 12-20-2004, 11:35 PM | #8 |
Change your event to "Is issued an order targeting a point..." This way, the game picks up on it when the order is given, instead of when it's actually happening. |
| 12-20-2004, 11:39 PM | #9 |
Doh, he's right. By the time blink begins it ends, since it's instant. Good one Sub. |
| 12-21-2004, 09:44 AM | #10 | |
Guest | Quote:
But then, the order "move" won't work in those areas, and you'll never be able to move there. Salutions® |
| 12-21-2004, 11:55 AM | #11 |
Guest | Use this trigger (although it still starts the animation, the unit doesnt perform blink anymore): Events - A Unit begins casting an ability Conditions - Ability being cast is equal to Blink - Or - Any Conditions are true (NoBlink <gen> contains Triggering Unit) equal to True (NoBlin2 <gen> contains Triggering Unit) equal to True (NoBlink3 <gen> contains Triggering Unit) equal to True .... Actions - Game - Display Text: "Can't Blink Here" - Unit - Order Triggering Unit to Stop I think the Conditions are checked at the time of the event, while your if clause is checked right after the event. For Blink this seems to matter. It doesnt work with "A Unit is issued an order targeting a point".. |
| 12-21-2004, 01:43 PM | #12 |
Actually theres a WEU advanced action that stops all actions for a certain unit, even abilities that are still being casted. It works perfect. I cast Blink into a place that is forbidden to Blink to, and it still shows the blue effect of Blink, but your unit will not move. Anyway, got it fixed.. thanks. |
| 12-21-2004, 04:51 PM | #13 | |
Quote:
Well, you would put a condition in assuring the order was equal to Blink, of course. But, actually, there might be a problem with this; your trigger relies on the target point of the ability, but that's not always where Blink takes you. Blink has an infinite Cast Range, meaning that you can TARGET any point, but you might not always GO TO that point; it might be out of range. Just set up a few conditions that insure the Blinker WOULD not appear in the Region upon casting, instead of the targeted point itself. This way, the casters can still target a point within the region, but if they're not in range, it won't matter. |
| 12-21-2004, 05:08 PM | #14 |
Why would i wanna do that.. the WEU action works perfectly, it can stop any ability, even instant once, from being casted. |
| 12-21-2004, 07:06 PM | #15 |
The problem I'm talking about has nothing to do with the event you're using. If I was going to escape from something, and hastily targeted my Blink in <region>, it would be stopped, even if I only wanted to go in that particular direction and was out of range to actually be in <region>. It shouldn't be stopped if the blink will NOT TAKE them INTO the region, regardless of the targeted point. |
