• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

One simple question on a Jass Tag

Status
Not open for further replies.
Level 5
Joined
May 25, 2009
Messages
103
Hi,
sry for creating a new thread for such a simple question, but i don't know anything about Jass.

I have following Tag in a JassSkript of this site:
" IsUnitEnemy(u, GetOwningPlayer(tmps.c)) "

[ " u " comes from: " local unit u=GetEnumUnit() " ]

I wanted to delete this, so the spell hits also friendly units - but now the spell hits also the casting unit.
What is the name of the tag, if i want something like this: " IsUnitSelfe "

Thx :)
 
Level 5
Joined
May 25, 2009
Messages
103
Thx for the quick answer :), but sry,
i think i didn't give enough information.
I experimented a bit, but i wasn't able to find a solution with your tag.

Here is the full line:

if IsUnitType(u, UNIT_TYPE_DEAD)==false and IsUnitType(u, UNIT_TYPE_STRUCTURE)==false and IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE)==false and (not IsUnitInGroup(u, tmps.g)) and IsUnitEnemy(u, GetOwningPlayer(tmps.c)) then .....

How do i have to change it, for enemies getting hit, friends too, but not the caster?

Thx, and sry for bothering you

Jasscraft, hm, i had to install JNGP for this spell, perhaps i have it already? (and i think i don't want too much Jass in the rest of my map :hohum: )
 
Last edited:
Level 11
Joined
Apr 6, 2008
Messages
760
dont use IsUnitType(u,UNIT_TYPE_DEAD) use GetWigetLife(u) > 0


JASS:
if GetWigetLife(u) > 0 and not IsUnitType(u, UNIT_TYPE_STRUCTURE) and not IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) and not IsUnitInGroup(u, tmps.g) and IsUnitEnemy(u, GetOwningPlayer(tmps.c)) then
 
Status
Not open for further replies.
Top