| 02-22-2004, 05:51 PM | #1 |
Whats the best way to detect units in a cone-type area in front of a caster? Right now im trying to build some kind of guesstimater, which takes every 100 units of space in front of him, and guesses the approximate height of the cone at that point (base on what i can see in-game), and picks all the units in that region for a unit group. if someone knew the formula for carrion swarms cone, thatd work too. thanks! |
| 02-22-2004, 05:58 PM | #2 |
I don't understand what you want.. |
| 02-22-2004, 06:01 PM | #3 |
Ok, lemme try. I have a custom carrion swarm spell. When it fires, I want to find a way to get all the units that are in the cone of effect, and do something else to them. I only want to do this if these units are asleep. Now, the way I know how to do it is guess the height of the cone every 100 units/space in front of the caster, and program a bunch of uber long and complicated triggers picking all units in that region of space (distance at least 0 from caster, height x, distance at least 100, height y, etc.). What I need, is a proper method for getting the effected units for carrion swarm, or the proper equation blizz uses for determining the growth of the carrion swarm between 0 and its max width. Does that make sense? |
| 02-22-2004, 06:02 PM | #4 |
Have a unit cast crrion swarm with a custom buff, than immediately pickevery units with those buffs. Add them to a unit group. |
| 02-22-2004, 06:03 PM | #5 |
so simple of course, but makes perfect sense. thankyou very very much! :D |
| 02-22-2004, 06:04 PM | #6 |
He beat me to it... damn! |
| 02-22-2004, 06:21 PM | #7 |
Glad to be of assistance. |
| 02-22-2004, 06:55 PM | #8 |
It doesnt seem to be working. Here is the code (with Wave of Terror being the modified Carrion Swarm): Unit - A unit Begins casting an ability (Ability being cast) Equal to Wave of Terror Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) has buff Wave of Terror ) Equal to True Then - Actions Game - Display to (All players) the text: DEBUG - Adding unit... Unit Group - Add (Picked unit) to WotGroup Else - Actions Do nothing The "wave of terror" buff is my custom buff, based off of curse, so that "Buffs" in the object editor for the modified carrion swarm looks like this: Level 1 - Stats - Buffs - Carrion Swarm (Caster), Wave of Terror Any ideas? Before you go jumping on teh obvious, I tried it with "Unit finishes casting an ability" as well. |
| 02-22-2004, 06:59 PM | #9 |
Try: Unit Group - Pick every unit in (Playable Map area) matching (Matching unit has buff (<yourbuff)) Add picked unit to (group) |
| 02-22-2004, 07:05 PM | #10 |
Still no good. According to my debug triggers all its detecting is that the spell is cast, its not detecting the buffed units :/ EDIT: there are the numerous buff bugs, is carrion swam one of them? |
| 02-22-2004, 07:12 PM | #11 |
Try the Pandorains one- breath of fire. |
| 02-22-2004, 07:13 PM | #12 |
yep thats what im doing now. lazy blizzard :/ thanks again. |
