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

New Triggers doing nothing

Status
Not open for further replies.
Level 2
Joined
Mar 14, 2011
Messages
9
[SOLVED]

Hi everyone,

I'm very confused about my Map because suddenly every new Trigger does nothing. I notices that when I used
JASS:
call TriggerExecute( gg_trg_SH_Table_Create )
call EnableTrigger( gg_trg_SH_Table_Refresh )
The executed and enabled trigger do nothing

Even this Trigger I created does nothing.

  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: hello
For your Information, if I check the TriggerEvaluate of a new Trigger its always says FALSE even if there is NO Condition.
Every old Trigger are working perfectly. (TriggerEvaluate = TRUE)

Somebody knows what's wrong ? :(
 
Last edited:
Level 7
Joined
Jan 7, 2009
Messages
44
I had some Blizzard related artifacts in my unfortunate mapping lifetime. As I recall I used "channel" keyword when creating GUI Variables. That completely turned off my map triggers. Have a look at your own. Hope something will help you out.
 
Level 2
Joined
Mar 14, 2011
Messages
9
EDIT: I solved the problem! The public variables have to be initialized before they can shown as a string ..

After a few changes most triggers now workingand I found the bugged Trigger.
These globals are used in the triggers for the 4 Spells of the Hero 'Schamane'
(There are in the scope 'Schamane')
JASS:
globals
    public unit Hero
    public player OwningPlayer

    public real a_value
    public real a_coeff
    public real a_multi
    public real a_duration
    
    public real b_value1
    public real b_value2
    public real b_coeff1
    public real b_coeff2
    public real b_multi
    public real b_duration
    
    public real c_value
    public real c_coeff
    public real c_multi
    public real c_duration
    
    public real d_value
    public real d_coeff
    public real d_multi
    public real d_duration
endglobals
Every Spell which is working with these variables are working correctly, and now i have a multiboard to show some information to the user.
This Trigger works when i comment out the strings working with 'b_xxx' variables or higher. I show you the trigger how it works:

JASS:
function Trig_SH_TableRefresh_Actions takes nothing returns nothing
    local string Spell1_Value  =       I2S(R2I(Schamane_a_value)) + " Heilung"
    local string Spell1_Coeff  =       I2S(R2I(Schamane_a_coeff * 100.00 )) + "%"
    local string Spell1_Multi  =       I2S(R2I(Schamane_a_multi * 100.00 )) + "%"
    local string Spell1_Dauer  =       "-"
    
    call BJDebugMsg("HAHA")
    /* 
    local string Spell2_Value  =       I2S(R2I(Schamane_b_value1)) + " Heilung + " + I2S(R2I(Schamane_b_value2)) + " HoT"
    local string Spell2_Coeff  =       I2S(R2I(Schamane_b_coeff1 * 100.00 )) + "% / "+ I2S(R2I(Schamane_b_coeff2 * 100.00 )) + "%"
    local string Spell2_Multi  =       I2S(R2I(Schamane_b_multi * 100.00 )) + "%"
    local string Spell2_Dauer  = SubString(R2S(Schamane_b_duration),0,4) + " Sek."
 
    local string Spell3_Value  =       I2S(R2I(Schamane_c_coeff * 100.00 )) + "%" + " des max. Lebens"
    local string Spell3_Coeff  =       I2S(R2I(Schamane_c_coeff * 100.00 )) + "%"
    local string Spell3_Multi  =       I2S(R2I(Schamane_c_multi * 100.00 )) + "%"
    local string Spell3_Dauer  =       "-"
  
    local string Spell4_Value  =       I2S(R2I(Schamane_d_value)) + " Koeff. Mutli."
    local string Spell4_Coeff  =       I2S(R2I(Schamane_d_coeff * 100.00 )) + "%"
    local string Spell4_Multi  =       I2S(R2I(Schamane_d_multi * 100.00 )) + "%"
    local string Spell4_Dauer  = SubString(R2S(Schamane_d_duration),0,4) + " Sek."
    
    
    
    call TriggerExecute( gg_trg_SH_Kettenheilung )
    call TriggerExecute( gg_trg_SH_Springflut )
    //call TriggerExecute( gg_trg_SH_HeilendeWoge )
    //call TriggerExecute( gg_trg_SH_Heldentum )
    
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 2, 2, Spell1_Value)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 3, 2, Spell1_Coeff)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 4, 2, Spell1_Multi)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 5, 2, Spell1_Dauer)
    
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 2, 3, Spell2_Value)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 3, 3, Spell2_Coeff)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 4, 3, Spell2_Multi)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 5, 3, Spell2_Dauer)
    
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 2, 4, Spell3_Value)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 3, 4, Spell3_Coeff)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 4, 4, Spell3_Multi)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 5, 4, Spell3_Dauer)
    
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 2, 5, Spell4_Value)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 3, 5, Spell4_Coeff)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 4, 5, Spell4_Multi)
    call MultiboardSetItemValueBJ( udg_SH_Multiboard, 5, 5, Spell4_Dauer)
    */
endfunction

//===========================================================================
function InitTrig_SH_TableRefresh takes nothing returns nothing
    set gg_trg_SH_TableRefresh = CreateTrigger(  )
    call DisableTrigger( gg_trg_SH_TableRefresh )
    call TriggerRegisterTimerEventPeriodic( gg_trg_SH_TableRefresh, 0.25 )
    call TriggerAddAction( gg_trg_SH_TableRefresh, function Trig_SH_TableRefresh_Actions )
endfunction

Maybe someone knows why these variables crash this trigger?
 
Last edited:
Status
Not open for further replies.
Top