• 🏆 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!

Identify Attack Type NONE

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2020
Messages
200
Hello,
Could someone please help me?
I need to identify what the NONE attack of the object editor is called in the JASS triggers.
I already identified all the other types of attacks and defenses as you can see in the Jass trigger below, but the last one "none" doesnt work.
In the advanced settings I have 8 types of attacks one beeing ETHEREAL, already tryed that it doesnt work aswell.
What I need is one last attack type for my system.
Need 8 in total.

JASS:
    if at == ATTACK_TYPE_CHAOS then
    set udg_watert = true
    else
    set udg_watert = false
    endif

    if at == ATTACK_TYPE_MAGIC then
    set udg_beastt = true
    else
    set udg_beastt = false
    endif

    if at == ATTACK_TYPE_MELEE then
    set udg_machinet = true
    else
    set udg_machinet = false
    endif

    if at == ATTACK_TYPE_PIERCE then
    set udg_airt = true
    else
    set udg_airt = false
    endif

    if at == ATTACK_TYPE_SIEGE then
    set udg_darkt = true
    else
    set udg_darkt = false
    endif

    if at == ATTACK_TYPE_NORMAL then
    set udg_firet = true
    else
    set udg_firet = false
    endif

    if at == ATTACK_TYPE_HERO then
    set udg_naturet = true
    else
    set udg_naturet = false
    endif

    if at == ATTACK_TYPE_NONE then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif
 
Level 8
Joined
Feb 20, 2020
Messages
200
no it's not.
Chaos is chaos.
In my system a unit with Chaos attack deals damage and shows the number with a purple collor.
A unit with Spell attack / none attack deals damage and for both shows the number with a red collor.
the others have collors aswell.
but only spell / none share it...
 

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,873
What have you been smoking? there's only 7 attack types:
ATTACK_TYPE_NORMAL, ATTACK_TYPE_MELEE, ATTACK_TYPE_PIERCE, ATTACK_TYPE_SIEGE, ATTACK_TYPE_MAGIC, ATTACK_TYPE_CHAOS, ATTACK_TYPE_HERO.
Unless you're doing a custom system with attack types, damage types, defense types, and armor types, the engine won't recognize these by itself.
 
Level 8
Joined
Feb 20, 2020
Messages
200
What have you been smoking? there's only 7 attack types:
ATTACK_TYPE_NORMAL, ATTACK_TYPE_MELEE, ATTACK_TYPE_PIERCE, ATTACK_TYPE_SIEGE, ATTACK_TYPE_MAGIC, ATTACK_TYPE_CHAOS, ATTACK_TYPE_HERO.
Unless you're doing a custom system with attack types, damage types, defense types, and armor types, the engine won't recognize these by itself.
... please don't be rude... ¬¬
and here is what i'm talking about if you can count you will see...
1 - none
2 - normal
3 - pirce
4 - siege
5 - spells
6 - chaos
7 - magic
8 - hero

1634256279663-png.388238
 

Attachments

  • 1634256279663.png
    1634256279663.png
    7.2 KB · Views: 37
Last edited:
Level 8
Joined
Feb 20, 2020
Messages
200
What have you been smoking? there's only 7 attack types:
ATTACK_TYPE_NORMAL, ATTACK_TYPE_MELEE, ATTACK_TYPE_PIERCE, ATTACK_TYPE_SIEGE, ATTACK_TYPE_MAGIC, ATTACK_TYPE_CHAOS, ATTACK_TYPE_HERO.
Unless you're doing a custom system with attack types, damage types, defense types, and armor types, the engine won't recognize these by itself.
... please don't be rude... ¬¬
and here is what i'm talking about if you can count you will see...

[hiden]
ATTACH]
[/hidden]
You can check for None by testing whether the variable equals null or not.
That's what I'm asking help... how to identify it... because there is no point in having this option in object editor if it just mirror of another one...
i tryed to identify it in many ways... but didnot work...

Also in the "game interface" there are 8 slots of icons...
 

Wrda

Spell Reviewer
Level 25
Joined
Nov 18, 2012
Messages
1,873
... please don't be rude... ¬¬
and here is what i'm talking about if you can count you will see...

[hiden]
ATTACH]
[/hidden]
I can count and I see 7. You can figure that out because you see that there's only 7 attack types being affected on gameplay constants and game interface, you don't see "NONE" there, do you?
Again, if you go deeper and look for more evidence, go to common.j and guess what you'll see? 7 attack types.

That's what I'm asking help... how to identify it... because there is no point in having this option in object editor if it just mirror of another one...
i tryed to identify it in many ways... but didnot work...
This tells me you didn't consider that option, this let's say "none attack type" is replaced with spell attack type in game, no idea why blizzard decided to do that. So it's still 7 attack types.
Also in the "game interface" there are 8 slots of icons...
That doesn't make any correlation to the said mysterious attack type.
 

Attachments

  • attack types.png
    attack types.png
    69.8 KB · Views: 20
Level 18
Joined
Oct 17, 2012
Messages
820
From
JASS:
 if at == ATTACK_TYPE_NONE then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif
to
JASS:
 if at == null then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif
or
JASS:
globals
   // Create your own global variable and refer to it
   attacktype ATTACK_TYPE_NONE = null
endglobals
....
 if at == ATTACK_TYPE_NONE then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif

So, ATTACK_TYPE_NONE does not exist. It is simply the equivalent of null for attacktype.
 
Level 8
Joined
Feb 20, 2020
Messages
200
From
JASS:
 if at == ATTACK_TYPE_NONE then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif
to
JASS:
 if at == null then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif
or
JASS:
globals
   // Create your own global variable and refer to it
   attacktype ATTACK_TYPE_NONE = null
endglobals
....
 if at == ATTACK_TYPE_NONE then
    set udg_holyt = true
    else
    set udg_holyt = false
    endif

So, ATTACK_TYPE_NONE does not exist. It is simply the equivalent of null for attacktype.
I will test it... thank you.
Now i have another problem...

  • Trainer Died and Revive
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
          • (Owner of (Dying unit)) Not equal to Player 14 (Navy)
        • Then - Actions
          • Set VariableSet NumberofRevives = (NumberofRevives + 1)
          • Set VariableSet HeroRevive[NumberofRevives] = (Dying unit)
          • Set VariableSet PNRES = (Player number of (Owner of (Dying unit)))
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Dying unit)) Less than 25
            • Then - Actions
              • Set VariableSet TempPoint = (Random point in Player 1 Spawn <gen>)
            • Else - Actions
              • Set VariableSet TempPoint = (Random point in Player 2 Spawn <gen>)
          • Unit - Create 1 Digimon Egg for (Triggering player) at TempPoint facing Default building facing degrees
          • Set VariableSet Gravestone[NumberofRevives] = (Last created unit)
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Countdown Timer - Start Hero_ReviveTimer[NumberofRevives] as a One-shot timer that will expire in 15.00 seconds
          • Countdown Timer - Create a timer window for Hero_ReviveTimer[NumberofRevives] with title ((Proper name of (Dying unit)) + is redigitilizing...)
          • Set VariableSet Hero_ReviveWindow[NumberofRevives] = (Last created timer window)
          • Countdown Timer - Hide (Last created timer window)
          • Countdown Timer - Show (Last created timer window) for (Triggering player)
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Dying unit)) Less than 25
            • Then - Actions
              • Set VariableSet TempPoint = (Random point in Player 1 Spawn <gen>)
            • Else - Actions
              • Set VariableSet TempPoint = (Random point in Player 2 Spawn <gen>)
          • -------- --------
          • Set VariableSet PGroup = (Player group((Triggering player)))
          • Game - Display to PGroup for 15.00 seconds the text: Your digimon died. ...
          • Custom script: call DestroyForce(udg_PGroup)
          • -------- --------
          • -------- Heal/Move all Monsters --------
        • Else - Actions
  • Revive Timer
    • Events
      • Time - Hero_ReviveTimer[1] expires
      • Time - Hero_ReviveTimer[2] expires
      • Time - Hero_ReviveTimer[3] expires
      • Time - Hero_ReviveTimer[4] expires
      • Time - Hero_ReviveTimer[5] expires
      • Time - Hero_ReviveTimer[6] expires
      • Time - Hero_ReviveTimer[7] expires
      • Time - Hero_ReviveTimer[8] expires
      • Time - Hero_ReviveTimer[9] expires
      • Time - Hero_ReviveTimer[10] expires
      • Time - Hero_ReviveTimer[11] expires
      • Time - Hero_ReviveTimer[12] expires
    • Conditions
    • Actions
      • -------- Get the timer / player number --------
      • For each (Integer Revive_Loop) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: if GetExpiredTimer() == udg_Hero_ReviveTimer[udg_Revive_Loop] then
          • Set VariableSet NumberofRevives = Revive_Loop
          • Custom script: endif
      • -------- --------
      • -------- --------
      • Set VariableSet TempPoint = (Position of Gravestone[NumberofRevives])
      • -------- --------
      • Unit - Remove Gravestone[NumberofRevives] from the game
      • Hero - Instantly revive HeroRevive[NumberofRevives] at TempPoint, Show revival graphics
      • Set VariableSet TempPlayer = (Owner of (Reviving Hero))
      • Selection - Clear selection for TempPlayer.
      • Selection - Add HeroRevive[NumberofRevives] to selection for TempPlayer
      • Countdown Timer - Destroy Hero_ReviveWindow[NumberofRevives]
      • Set VariableSet NumberofRevives = (NumberofRevives - 1)
      • Custom script: call RemoveLocation(udg_TempPoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • NumberofRevives Greater than 0
        • Then - Actions
          • Set VariableSet HeroRevive[NumberofRevives] = HeroRevive[(NumberofRevives + 1)]
        • Else - Actions
      • -------- --------
      • -------- --------
      • Set VariableSet TempPoint = (Center of Player 1 Spawn <gen>)
      • Camera - Pan camera for TempPlayer to TempPoint over 0.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • -------- --------
This trigger, if 2 monsters dies at the same time for the same player it bugs the first countdown...
what should I do?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
This trigger, if 2 monsters dies at the same time for the same player it bugs the first countdown...
what should I do?
Try to be more specific since people don't know how you want it to work exactly.

But I assume you want multiple timer windows to run at once for each player. I attached a map with a system you can use.
 

Attachments

  • Death Timer Example.w3m
    18.4 KB · Views: 8
Last edited:
Status
Not open for further replies.
Top