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

[Solved] Problem with a damage detector

Status
Not open for further replies.
Level 19
Joined
Feb 27, 2019
Messages
590
Have you made sure the function InitGlobalVariables has the correct spell IDs?
"3. Copy the two custom abilities to your map and make sure they have the
// correct ID. You can specify the ID in the function InitGlobalVariables
// above."
You can see the spell ID in the object editor by pressing Ctrl + D
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
Have you made sure the function InitGlobalVariables has the correct spell IDs?
"3. Copy the two custom abilities to your map and make sure they have the
// correct ID. You can specify the ID in the function InitGlobalVariables
// above."
You can see the spell ID in the object editor by pressing Ctrl + D
I don't know nearly nothing about JASS, Can you give me details?
 
Level 19
Joined
Feb 27, 2019
Messages
590
I don't know nearly nothing about JASS, Can you give me details?
I am not great with jass either but I am getting there.

The function InitGlobalVariables is simple enough though, it only sets variables. You can find the function by using Ctrl + F and searching for it in the jass trigger. It should look like this right now:

function InitGlobalVariables takes nothing returns nothing
// Put here the correct ability IDs
  • Set Variable Set PDD_DAMAGE_TYPE_DETECTOR = A000
  • Set Variable Set PDD_SET_MAX_LIFE = A001
// Here you can configure some stuff, read the documentation for further info
set udg_PDD_SPELL_DMG_REDUCTION_ITEM = 'brac'
set udg_PDD_SPELL_RESIST_AUTO_DETECT = false
set udg_PDD_ETHEREAL_DAMAGE_FACTOR = 1.66
set udg_PDD_BRACERS_SPELL_DMG_RED = 0.33
set udg_PDD_TRIGGER_CLEANUP_PERIOD = 60.0
endfunction

As you can see I added the trigger code in hive for when those variables are set and changed it a tiny bit to show how it would look in gui. Both variables are string variables. This string will be used somewhere else to identify the correct abilities.

So if you follow the instructions I gave earlier those are the ability IDs that should be put there instead.

EDIT: Functions are a bit like triggers. So call udg_InitGlobalVariables could be Run Trigger InitGlobalVariables and inside this specific one some variables are set. Functions are more flexible though.
 
Last edited:
Level 24
Joined
Jun 26, 2020
Messages
1,852
I am not great with jass either but I am getting there.

The function InitGlobalVariables is simple enough though, it only sets variables. You can find the function by using Ctrl + F and searching for it in the jass trigger. It should look like this right now:

function InitGlobalVariables takes nothing returns nothing
// Put here the correct ability IDs
  • Set Variable Set PDD_DAMAGE_TYPE_DETECTOR = A000
  • Set Variable Set PDD_SET_MAX_LIFE = A001
// Here you can configure some stuff, read the documentation for further info
set udg_PDD_SPELL_DMG_REDUCTION_ITEM = 'brac'
set udg_PDD_SPELL_RESIST_AUTO_DETECT = false
set udg_PDD_ETHEREAL_DAMAGE_FACTOR = 1.66
set udg_PDD_BRACERS_SPELL_DMG_RED = 0.33
set udg_PDD_TRIGGER_CLEANUP_PERIOD = 60.0
endfunction

As you can see I added the trigger code in hive for when those variables are set and changed it a tiny bit to show how it would look in gui. Both variables are string variables. This string will be used somewhere else to identify the correct abilities.

So if you follow the instructions I gave earlier those are the ability IDs that should be put there instead.

EDIT: Functions are a bit like triggers. So call udg_InitGlobalVariables could be Run Trigger InitGlobalVariables and inside this specific one some variables are set. Functions are more flexible though.
Oh, I see, thanks for the help, it worked.
 
Status
Not open for further replies.
Top