Warcraft III resources & community, 2003–2006 · archived

can be casted only in water

7 posts
#1

can be casted only in water

"can be casted only in the water" is it possible..

just like the skill of cenarius.. the treant dudes..
i was thinking of water dudes.. but it needs water for the skill...
#2
make reigions wherever there is water and this trigger-

Event-
Unit Starts The Effects Of Ability
Condition-
Ability being cast = Water Spell
Actions-
if all conditions are true then the the else do else...
If-
Triggering Unit is in Reigion 000
Triggering unit is in Reigion 001
*(so on and so on)*
then-
*(Ability Actions)*
Else-
issue triggering unit to stop
Game- Display meesage to owner of triggering unit: Must Be In Water.



there ya go.
#3
thnx agen =)
#4
iplaystarcraftmake reigions wherever there is water and this trigger-

Event-
Unit Starts The Effects Of Ability
Condition-
Ability being cast = Water Spell
Actions-
if all conditions are true then the the else do else...
If-
Triggering Unit is in Reigion 000
Triggering unit is in Reigion 001
*(so on and so on)*
then-
*(Ability Actions)*
Else-
issue triggering unit to stop
Game- Display meesage to owner of triggering unit: Must Be In Water.


Umm, that's need too much region. I think there are checking for pathing walkability or pathing amphibious. Not remember exactly, but try to search it.
#5
local location loc = GetSpellTargetLoc()

if IsTerrainPathableBJ(loc,PATHING_TYPE_FLOATABILITY)==false and IsTerrainPathableBJ(loc,PATHING_TYPE_WALKABILITY)==true then
  //ur stuff
else
  //say something like it can be casted only on water
endif

call RemoveLocation(loc)
set loc = null
#6
thnx..

snaky.. how can i transfer this to my trigger?.. CnP? =)
#7
Convert your trigger with Edit->Convert to custom text. Then CnP it to the needed part in your JASS script. Hope you know what you are doing!