| 06-22-2007, 09:14 AM | #1 |
The event trigger detecting a unit within range only works for specific unit? how am i suppose to make that work with the bullet i am shooting. I already created a bullet that is triggered to move to to target point of ability being cast when i cast it but to make it dmg the target it collides with, what can i do?? I think there is a trigger i must have missed somewhere. I tried using the goblin mine ability to detect units in range but it works 2 slowly and gets it wrong |
| 06-22-2007, 09:18 AM | #2 |
oh nvm sry i think i found the trigger with the pick every unit in range, i was focusing on the wrong thing, its action not event. Searched the forum alot of times and found no answers till now lol |
| 06-22-2007, 05:10 PM | #3 |
Yeah dude, that pick every unit in range really still doesn't work for half the things you'd think it'd work for. For instance, for my trigger which supposed to pick all units in range to detect if any of those units are buildings of a specific type, that pick all units in range NEVER worked. I had to create a damned move region trigger -- it'd move the region then pick all units in the region then remove all units in the region which didn't match a condition, then checked the condition. god I hate the game engine sometimes it's so buggy and worthless. |
| 06-23-2007, 10:43 PM | #4 |
Youre saying that Pick All Units Within X of (Triggering Unit) matching ((Matching Unit) is a building) is equal to true... didnt pick all units that were buildings? |
| 06-23-2007, 10:59 PM | #5 | |
Quote:
It's not that the engine is buggy and worthless, it's your scripting skills that need a tad of brushing up. |
| 06-23-2007, 11:00 PM | #6 | |
Because you need to use this: JASS:function Filter takes nothing returns nothing return IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) and IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) // Detects ground units, heroes and buildings endfunction function Blarg takes nothing returns nothing local group g = CreateGroup() local boolexpr b = Condition(function Filter) call GroupEnumUnitsInRange(<Which Group? In this case, the variable g>, <X Coordinate>, <Y Coordinate>, <Radius>, <What Kind of Units to pick? Use a boolexpr, in this case the variable b>) //Do what you want.. //In between these two comments, the following lines are just for cleaning up call DestroyGroup(g) call DestroyBoolExpr(b) set g = null set b = null endfunction Quote:
Blame blizzard for their lame BJ functions, slow and sometimes unnecessary. |
| 06-23-2007, 11:20 PM | #7 |
that filter will only return true to ground, hero-buildings though :P |
| 06-24-2007, 01:51 AM | #8 | |
Quote:
Toink, please read a lil' more thoroughly... |
| 06-24-2007, 02:24 AM | #9 |
I think we got off topic and Kevin's problem was being discussed :( |
