Warcraft III resources & community, 2003–2006 · archived

Only castable while inside region?

6 posts
#1

Only castable while inside region?

im doing an spell which is supposed to only be able to cast while inside a special region... but i cant find anything thats like "triggring unit is in region" only Triggering unit enters region" or "triggering unit leaves region". how can i get this to work, plz i need help. :?
#2
Someone on map forum told about this:

.. add a condition "Boolean" -> "Unit in region" -> "(sands of pain) contains (Hero) equal to true"...

I've not checked yet.
#3
Event:
:arrow: A unit starts the effect of an ability
Conditions:
:arrow: Ability being cast equal to "X"
:arrow: Terrain type at position of casting unit equal to (The terrain type you want the spell working)!
Actions:
:arrow: Here you put the actions that will happen in the spell!

Hope that helped! 8)
#4
I think he means a region not a terrain type.
#5
If i know anything about what he's going for, then both methods have alreayd been done. However i'd rather enable/disable the spells instead of not getting them to be effected.
#6
i think i can do this... here try this one out...

first trigger:
events: unit - a unit enters (current camera bounds)
conditions:
actions: unit - add ability to (triggering unit)


second trigger:
events: unit - a unit exits (current camera bounds)
conditions:
actions: unit - remove ability from (triggering unit)




im getting good at this... just make sure that when you add these triggers that the camera is where u want it... and it is actually when unit enters/exits rect and u change rect to camera bounds