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

[JASS] Simple unknown bug

Status
Not open for further replies.
Hi guys, I am making a pure JASS trigger for a campaign. Thing is I have a bug. This trigger selects all units withing a unit group every second and then makes 3 checks:
- if unit has buff and is alive, we deal 50 damage
- If unit is dead, we pick all unit around it that are alive, and we damage them
- if unit does not have bug, we remove it from group

I have a problem on point 2, it works bad if I remove the if... and I want it to work without any flaws. Help please ?

JASS:
//!=======================================================!\\
//!=======================SETUP START=====================!\\
//!=======================================================!\\
constant function buffID takes nothing returns integer
    return 'BNba' //the rawcode of the buff of the spell (black arrow)
endfunction

constant function lifeDamage takes nothing returns integer
    return 50 //the amount of life the unit will lose
endfunction

constant function manaLoss takes nothing returns integer
    return 50 //the amount of mana the unit will lose
endfunction

constant function text takes nothing returns string
    return "50" //the text that will appear each second the unit loses hp and mana
endfunction

constant function red takes nothing returns integer
    return 0 //the RGB red color of the text, from 0 to 255
endfunction

constant function green takes nothing returns integer
    return 255 //the RGB green color of the text, from 0 to 255
endfunction

constant function blue takes nothing returns integer
    return 0 //the RGB blue color of the text, from 0 to 255
endfunction

constant function time takes nothing returns real
    return 2.0 //the amount of time the text will appear
endfunction

constant function AOE takes nothing returns integer
    return 200 //the area of effect of the explosion
endfunction

constant function damageExplosion takes nothing returns integer
    return 250 //the damage the spell will cause
endfunction

constant function ef takes nothing returns string
    //the string of the effect. All effects have a string path, which you can see
    //this way you can use hidden effects !
    return "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl"
endfunction

constant function textExplosion takes nothing returns string
    return "250 !" //the text that will appear when unit is damaged
endfunction

constant function redExplosion takes nothing returns integer
    return 0 //the RGB red color of the text, from 0 to 255
endfunction

constant function greenExplosion takes nothing returns integer
    return 0 //the RGB green color of the text, from 0 to 255
endfunction

constant function blueExplosion takes nothing returns integer
    return 255 //the RGB blue color of the text, from 0 to 255
endfunction

constant function timeExplosion takes nothing returns real
    return 2.0 //the amount of time the text will appear
endfunction

//!=======================================================!\\
//!=======================SETUP END=======================!\\
//!=======================================================!\\

//=================================================================
function copyGroup takes group g returns group
    set bj_groupAddGroupDest = CreateGroup()
    call ForGroup(g, function GroupAddGroupEnum)
    return bj_groupAddGroupDest
endfunction
//=================================================================
function Damager_Actions takes nothing returns nothing
    local group g = CreateGroup()
    local unit vic
        
    local group explosion = CreateGroup()
    local unit f
       
    local texttag t
    local effect effExplosion
    
    set g = copyGroup(udg_Abadon)
    
    loop
        set vic = FirstOfGroup(g)
        exitwhen(vic == null)
        
        if (UnitHasBuffBJ(vic, buffID()) and (GetWidgetLife(vic) > 0.405)) then
            call SetWidgetLife(vic, GetWidgetLife(vic) - lifeDamage())
            call SetUnitState(vic, UNIT_STATE_MANA, GetUnitState(vic, UNIT_STATE_MANA) - manaLoss())
            
            set t = CreateTextTag()
            call SetTextTagText(t, text(), .023 )   
            call SetTextTagPosUnit( t, vic, 0 )
            call SetTextTagColor( t, red(), green(), blue(), 255 )   
            call SetTextTagPermanent(t, false)
            call SetTextTagVelocity( t, 0, .0277 )
            call SetTextTagLifespan(t, time())
        elseif (GetWidgetLife(vic) <= 0.405) then
            
            call GroupEnumUnitsInRange( explosion, GetUnitX( vic ), GetUnitY( vic ), AOE(), Filter(null) )  
            
            loop
                set f = FirstOfGroup(explosion)
                exitwhen(f == null)
                
                if ((GetWidgetLife(f) > 0.405) == true) then
                    set effExplosion = AddSpecialEffect(ef(), GetUnitX(f), GetUnitY(f))
                    set t = CreateTextTag()
                    call SetTextTagText(t, textExplosion(), .023 )   
                    call SetTextTagPosUnit( t, vic, 0 )
                    call SetTextTagColor( t, redExplosion(), greenExplosion(), blueExplosion(), 255 )   
                    call SetTextTagPermanent(t, false)
                    call SetTextTagVelocity( t, 0, .0277 )
                    call SetTextTagLifespan(t, timeExplosion())
            
                    call SetWidgetLife(vic, GetWidgetLife(vic) - damageExplosion())
                
                    call GroupRemoveUnit(explosion, f)
                    call DestroyEffect(effExplosion)
                endif
            endloop
            
            
            
            call GroupRemoveUnit(udg_Abadon, vic)
        else
            call GroupRemoveUnit(udg_Abadon, vic)
        endif
        call GroupRemoveUnit(g, vic)
    endloop
    
    call DestroyGroup(explosion)
    call DestroyGroup(g)
    set g = null
    set explosion = null
    set t = null
    set effExplosion = null
endfunction
//===========================================================================
function InitTrig_Damager takes nothing returns nothing
    set gg_trg_Damager = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Damager, 1.0 )
    call TriggerAddAction( gg_trg_Damager, function Damager_Actions )
endfunction
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
JASS:
//!=======================================================!\\
//!=======================SETUP START=====================!\\
//!=======================================================!\\
constant function buffID takes nothing returns integer
    return 'BNba' //the rawcode of the buff of the spell (black arrow)
endfunction

constant function lifeDamage takes nothing returns integer
    return 50 //the amount of life the unit will lose
endfunction

constant function manaLoss takes nothing returns integer
    return 50 //the amount of mana the unit will lose
endfunction

constant function text takes nothing returns string
    return "50" //the text that will appear each second the unit loses hp and mana
endfunction

constant function red takes nothing returns integer
    return 0 //the RGB red color of the text, from 0 to 255
endfunction

constant function green takes nothing returns integer
    return 255 //the RGB green color of the text, from 0 to 255
endfunction

constant function blue takes nothing returns integer
    return 0 //the RGB blue color of the text, from 0 to 255
endfunction

constant function time takes nothing returns real
    return 2.0 //the amount of time the text will appear
endfunction

constant function AOE takes nothing returns integer
    return 200 //the area of effect of the explosion
endfunction

constant function damageExplosion takes nothing returns integer
    return 250 //the damage the spell will cause
endfunction

constant function ef takes nothing returns string
    //the string of the effect. All effects have a string path, which you can see
//this way you can use hidden effects !
    return "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl"
endfunction

constant function textExplosion takes nothing returns string
    return "250 !" //the text that will appear when unit is damaged
endfunction

constant function redExplosion takes nothing returns integer
    return 0 //the RGB red color of the text, from 0 to 255
endfunction

constant function greenExplosion takes nothing returns integer
    return 0 //the RGB green color of the text, from 0 to 255
endfunction

constant function blueExplosion takes nothing returns integer
return 255 //the RGB blue color of the text, from 0 to 255
endfunction

constant function timeExplosion takes nothing returns real
    return 2.0 //the amount of time the text will appear
endfunction

//!=======================================================!\\
//!=======================SETUP END=======================!\\
//!=======================================================!\\

//=================================================================
function copyGroup takes group g returns group
    set bj_groupAddGroupDest = CreateGroup()
    call ForGroup(g, function GroupAddGroupEnum)
    return bj_groupAddGroupDest
endfunction
function simplefilt takes nothing returns boolean
return GetWidgetLife(GetFilterUnit()) > 0.405
endfunction
//=================================================================
function Damager_Actions takes nothing returns nothing
    local group g = CreateGroup()
    local unit vic

    local group explosion = CreateGroup()
    local unit f

    local texttag t
    local effect effExplosion

    set g = copyGroup(udg_Abadon)

    loop
        set vic = FirstOfGroup(g)
        exitwhen(vic == null)
        if (GetUnitAbilityLevel(vic, buffID())>0 and (GetWidgetLife(vic) > 0.405)) then
            call SetWidgetLife(vic, GetWidgetLife(vic) - lifeDamage())
            call SetUnitState(vic, UNIT_STATE_MANA, GetUnitState(vic, UNIT_STATE_MANA) - manaLoss())

            set t = CreateTextTag()
            call SetTextTagText(t, text(), .023 )
            call SetTextTagPosUnit( t, vic, 0 )
            call SetTextTagColor( t, red(), green(), blue(), 255 )
            call SetTextTagPermanent(t, false)
            call SetTextTagVelocity( t, 0, .0277 )
            call SetTextTagLifespan(t, time())
        elseif (GetWidgetLife(vic) <= 0.405) then
            call GroupEnumUnitsInRange( explosion, GetUnitX( vic ), GetUnitY( vic ), AOE(), Filter(function simplefilt) )

            loop
                set f = FirstOfGroup(explosion)
                exitwhen(f == null)
                    set effExplosion = AddSpecialEffect(ef(), GetUnitX(f), GetUnitY(f))
                    set t = CreateTextTag()
                    call SetTextTagText(t, textExplosion(), .023 )
                    call SetTextTagPosUnit( t, vic, 0 )
                    call SetTextTagColor( t, redExplosion(), greenExplosion(), blueExplosion(), 255 )
                    call SetTextTagPermanent(t, false)
                    call SetTextTagVelocity( t, 0, .0277 )
                    call SetTextTagLifespan(t, timeExplosion())
                    call SetWidgetLife(vic, GetWidgetLife(vic) - damageExplosion())
                    call GroupRemoveUnit(explosion, f)
                    call DestroyEffect(effExplosion)
            endloop
            call GroupRemoveUnit(udg_Abadon, vic)
        else
            call GroupRemoveUnit(udg_Abadon, vic)
        endif
        call GroupRemoveUnit(g, vic)
    endloop

    call DestroyGroup(explosion)
    call DestroyGroup(g)
    set g = null
    set explosion = null
    set t = null
    set effExplosion = null
endfunction
//===========================================================================
function InitTrig_Damager takes nothing returns nothing
    set gg_trg_Damager = CreateTrigger( )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Damager, 1.0 )
    call TriggerAddAction( gg_trg_Damager, function Damager_Actions )
endfunction
I am not sure what was the problem with point 2 you were referring to, but what I found was the message "hit on Op limit in Damager_Actions".
That is caused by the fact that you pick a lot of units and go through them really fast(if they are dead). Picking less units seems to fix the problem( by adding a filter(like checking if the filtered unit is alive)).
Also changed some minor stuff:
Do not use UnitHasBuffBJ, instead use GetUnitAbilityLevel(vic, buffID())>0
When you have a conditional expression like Something >10 you do not need to add a ==true (you did that on one place, but you did not on others, so I think you know this already).
But note that text tags do not appear properly with a lot of units being affected. I have not "fully mastered" text tags yet, so this is a little bit beyond my help.
 
Do not use UnitHasBuffBJ, instead use GetUnitAbilityLevel(vic, buffID())>0
I know, I was going to update that later xD7

When you have a conditional expression like Something >10 you do not need to add a ==true
Normally you would be true. However in some cases JASS bugs, and therefore you have to add true. I didn't know if this was one of those cases.

ut note that text tags do not appear properly with a lot of units being affected. I have not "fully mastered" text tags yet, so this is a little bit beyond my help.
Np, the texttags work fine =)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Well, when I tested it the spell was affecting 100++ units and text was not appearing over every single one.
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
call GroupRemoveUnit(udg_Abadon, vic)

Should be:

call GroupRemoveUnit(g, vic)

In both cases. You need to read up a bit more on the difference between pointers and objects, I think.

Also, you leak a group, change the first line of the function to:

local group g = copyGroup(udg_Abadon)

And remove the setting of it further down.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
call GroupRemoveUnit(udg_Abadon, vic)
Should be:
call GroupRemoveUnit(g, vic)
In both cases. You need to read up a bit more on the difference between pointers and objects, I think.
Also, you leak a group, change the first line of the function to:
local group g = copyGroup(udg_Abadon)
And remove the setting of it further down.

Eh, ... call GroupRemoveUnit(udg_Abadon, vic) is what it should be...
(if the unit is dead or alive but does not have the buff, it will no longer ... eh ... take effect ;) )
call GroupRemoveUnit(g, vic) is there
But about the other stuff, you are correct ;)
 
call GroupRemoveUnit(udg_Abadon, vic)

Should be:

call GroupRemoveUnit(g, vic)

In both cases. You need to read up a bit more on the difference between pointers and objects, I think.

Also, you leak a group, change the first line of the function to:

local group g = copyGroup(udg_Abadon)

And remove the setting of it further down.

Eh, ... call GroupRemoveUnit(udg_Abadon, vic) is what it should be...
(if the unit is dead or alive but does not have the buff, it will no longer ... eh ... take effect ;) )
call GroupRemoveUnit(g, vic) is there
But about the other stuff, you are correct ;)
Meh !? WHo is rit ?? Well, I need to remove the unit from group g, after I see it, but also need to remove it from Abandon is it is either dead, or doesn't have the buff. If it is dead, when removing i should also damage all nearby enemy units.

Mmm leaking !? OMG, I will fix that right away.
What about the groups, what am I doing wrong ?

EDIT EDIT EDIT
Made a few changes ... but the problems still remain...


Guys I am getting sick of this code ... nothing I do seems to fix the damn bug, so here I post everything of the spell... Although I am pretty sure the bug is in the damager trigger.

JASS:
//!=======================================================!\\
//!=======================SETUP START=====================!\\
//!=======================================================!\\
constant function itemID takes nothing returns integer
    return 'I000' //the rawcode of the item
endfunction

constant function spellID takes nothing returns integer
    return 'A000' //the rawcode of the spell that the dummy will cast
endfunction

constant function order takes nothing returns string
    return "blackarrow" //the order of the dummy spell for the unit to cast it
endfunction

constant function dummyID takes nothing returns integer
    return 'h000' //the dummy unit's rawcode
endfunction

constant function range takes nothing returns integer
    return 600 //the range of the spell
endfunction

//!=======================================================!\\
//!=======================SETUP END=======================!\\
//!=======================================================!\\

function Abadon_Conditions takes nothing returns boolean
    return GetItemTypeId(GetManipulatedItem()) == itemID()
endfunction
//============================================================
function Abadon_Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit() 
    local unit dummy
    local unit vic
    local group g = CreateGroup()
    
    call GroupEnumUnitsInRange( g, GetUnitX( caster ), GetUnitY( caster ), range(), Filter(null) )  
    loop  
        set vic = FirstOfGroup( g )  
        exitwhen (vic==null)  
        if IsUnitEnemy(vic, GetOwningPlayer(caster)) then  
            call GroupAddUnit(udg_Abadon, vic)
            set dummy = CreateUnit(GetOwningPlayer(caster), dummyID(), GetUnitX(vic), GetUnitY(vic), 0)  
            call UnitAddAbility(dummy, spellID())  
            call IssueTargetOrder(dummy, order(), vic)  
            call UnitApplyTimedLife(dummy, 'BTLF', 1.0)
        endif  
        call GroupRemoveUnit(g,vic)  
    endloop  
    
    call DestroyGroup(g)
    set g = null
    set caster = null
    set dummy = null
endfunction
//============================================================
function InitTrig_Abadon takes nothing returns nothing
    set gg_trg_Abadon = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Abadon, EVENT_PLAYER_UNIT_USE_ITEM )
    call TriggerAddCondition(gg_trg_Abadon, Condition(function Abadon_Conditions))
    call TriggerAddAction(gg_trg_Abadon, function Abadon_Actions)
endfunction

This trigger adds units to the group when we use the stupid item

JASS:
//!=======================================================!\\
//!=======================SETUP START=====================!\\
//!=======================================================!\\
constant function buffID takes nothing returns integer
    return 'BNba' //the rawcode of the buff of the spell (black arrow)
endfunction

constant function lifeDamage takes nothing returns integer
    return 50 //the amount of life the unit will lose
endfunction

constant function manaLoss takes nothing returns integer
    return 50 //the amount of mana the unit will lose
endfunction

constant function text takes nothing returns string
    return "50" //the text that will appear each second the unit loses hp and mana
endfunction

constant function red takes nothing returns integer
    return 0 //the RGB red color of the text, from 0 to 255
endfunction

constant function green takes nothing returns integer
    return 255 //the RGB green color of the text, from 0 to 255
endfunction

constant function blue takes nothing returns integer
    return 0 //the RGB blue color of the text, from 0 to 255
endfunction

constant function time takes nothing returns real
    return 2.0 //the amount of time the text will appear
endfunction

constant function AOE takes nothing returns integer
    return 200 //the area of effect of the explosion
endfunction

constant function damageExplosion takes nothing returns integer
    return 250 //the damage the spell will cause
endfunction

constant function ef takes nothing returns string
    //the string of the effect. All effects have a string path, which you can see
    //this way you can use hidden effects !
    return "Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl"
endfunction

constant function textExplosion takes nothing returns string
    return "250 !" //the text that will appear when unit is damaged
endfunction

constant function redExplosion takes nothing returns integer
    return 0 //the RGB red color of the text, from 0 to 255
endfunction

constant function greenExplosion takes nothing returns integer
    return 0 //the RGB green color of the text, from 0 to 255
endfunction

constant function blueExplosion takes nothing returns integer
    return 255 //the RGB blue color of the text, from 0 to 255
endfunction

constant function timeExplosion takes nothing returns real
    return 2.0 //the amount of time the text will appear
endfunction

//!=======================================================!\\
//!=======================SETUP END=======================!\\
//!=======================================================!\\

//=================================================================
function copyGroup takes group g returns group
    set bj_groupAddGroupDest = CreateGroup()
    call ForGroup(g, function GroupAddGroupEnum)
    return bj_groupAddGroupDest
endfunction
//=================================================================
function Damager_Actions takes nothing returns nothing
    local group g = copyGroup(udg_Abadon)
    local unit vic
        
    local group explosion =  CreateGroup()
    local unit f
       
    local texttag t
    local effect effExplosion
    
    call BJDebugMsg(I2S(CountUnitsInGroup(udg_Abadon)))
    loop
        set vic = FirstOfGroup(g)
        exitwhen(vic == null)
        call GroupRemoveUnit(g, vic)
        
        if ((GetUnitAbilityLevel(vic, buffID()) >0) and (GetWidgetLife(vic) > 0.405) and (IsUnitType(vic, UNIT_TYPE_MECHANICAL)==false) and IsUnitType(vic, UNIT_TYPE_MAGIC_IMMUNE)==false) then
            call SetWidgetLife(vic, GetWidgetLife(vic) - lifeDamage())
            
            if (GetUnitState(vic, UNIT_STATE_MANA) > 0) then
                call SetUnitState(vic, UNIT_STATE_MANA, GetUnitState(vic, UNIT_STATE_MANA) - manaLoss())
            endif
            
            set t = CreateTextTag()
            call SetTextTagText(t, text(), .023 )   
            call SetTextTagPosUnit( t, vic, 0 )
            call SetTextTagColor( t, red(), green(), blue(), 255 )   
            call SetTextTagPermanent(t, false)
            call SetTextTagVelocity( t, 0, .0277 )
            call SetTextTagLifespan(t, time())
        
        //when a unit inside the group dies, it damages all allied units in AOE
        elseif (GetWidgetLife(vic) <= 0.405) then    
            call GroupRemoveUnit(udg_Abadon, vic)
            
            call GroupEnumUnitsInRange( explosion, GetUnitX( vic ), GetUnitY( vic ), AOE(), Filter(null) )  
            loop
                set f = FirstOfGroup(explosion)
                exitwhen(f == null)
                call GroupRemoveUnit(explosion, f)
                if ((GetWidgetLife(f) > 0.405) and (IsUnitType(f, UNIT_TYPE_MECHANICAL)==false) and (IsUnitType(f, UNIT_TYPE_MAGIC_IMMUNE)==false) and (IsUnitEnemy(f, GetOwningPlayer(f))==true)) then
                    
                    set effExplosion = AddSpecialEffect(ef(), GetUnitX(f), GetUnitY(f))
                    set t = CreateTextTag()
                    call SetTextTagText(t, textExplosion(), .023 )   
                    call SetTextTagPosUnit( t, vic, 0 )
                    call SetTextTagColor( t, redExplosion(), greenExplosion(), blueExplosion(), 255 )   
                    call SetTextTagPermanent(t, false)
                    call SetTextTagVelocity( t, 0, .0277 )
                    call SetTextTagLifespan(t, timeExplosion())
            
                    call SetWidgetLife(f, GetWidgetLife(f) - damageExplosion())
                
                    call DestroyEffect(effExplosion)
                endif
            endloop
           
           //this should remove the unit from the group ONLY if it doesn't have the buff .. 
        elseif ((GetUnitAbilityLevel(vic, buffID()) <= 0)) then
            call GroupRemoveUnit(udg_Abadon, vic)
        endif
    endloop
    
    call DestroyGroup(explosion)
    call DestroyGroup(g)
    set g = null
    set explosion = null
    set t = null
    set effExplosion = null
endfunction
//===========================================================================
function InitTrig_Damager takes nothing returns nothing
    set gg_trg_Damager = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Damager, 1.0 )
    call TriggerAddAction( gg_trg_Damager, function Damager_Actions )
endfunction
This trigger damages the units, and if they die, they just blow up in an explosion.
Here is the map for you guys to see the spell in action.

can anyone help me please ?
 

Attachments

  • abadon.w3x
    17.9 KB · Views: 62
Level 12
Joined
Apr 27, 2008
Messages
1,228
Again, do not use Filter(null) when you are going to filter the units later, it just stresses the pc. But if you wish to have no filter simply use null instead of Filter(null).
I will examine the map.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
I kinda doubt that too.
Found something(not tested yet):
(IsUnitEnemy(f, GetOwningPlayer(f))==true)
:D
Guess where the problem is.
I think you wanted it to be:
(IsUnitEnemy(f, GetOwningPlayer(vic))==true)
Also the constant function ItemID should have some other name.
Tested works.
But with (IsUnitEnemy(f, GetOwningPlayer(vic))==true) you will get damaged, maybe it should be false :p
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Eh .... this (IsUnitEnemy(f, GetOwningPlayer(f))==true)
Changing that sorta fixed it!!?
Also:
call SetTextTagPosUnit( t, vic, 0 )
Should be:
call SetTextTagPosUnit( t, f, 0 )
Or it should not be in the loop(the explosion one).
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Ah, yes.
Because they do not have the buff when the trigger fires.
Use a wait(bad idea).
Use the event Unit finishes the effect of an ability and check what ability was used.
P.s. Nope, wait is good.
call TriggerSleepActions(-1) right after the initialization of the locals.
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
I just started reading your code.

1. Why are you using preprocessor comments! I'm aware you aren't using JNGP, but still, remove the ! for sanity's sake.
2. Beh... constant functions are so obsolete.

Now, to see where your code explodes.

Firstly, itemID is a previously declared identifier in one of blizzard's initialization functions (CreateAllItems). So you better rename the itemID function to something else.

Secondly, lol found the bug. The dummy unit has a cast backswing, which makes each unit not affected by the buff even while the first check is made. So they are all removed from the udg_Abadon group. Set the dummy unit's cast backswing to 0 in the unit editor, and everything should work great :p
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Yeah, that should do it too.
P.s. More than that, dummy casters usually must have cast backswing 0.

About filters
 
Last edited:
Lol ... is fixed... Well, HD, Daelin says constant functions are faster than regular ones, and so o find them perfect for the JESP standard use =). Also, I see them a lot when I download codes from wc3 campaigns in a Spell pack made by Damions, which is a great spell pack =)

Anyway, problem fixed =) thx guys !

Why are you using preprocessor comments!
btw, what is that ?
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
Constant functions compile the same as regular functions, but that's not what I meant. I meant learn to use JNGP so you can use constant globals! :p

Preprocessor comments, a JNGP feature to do things like textmacros, libraries, scopes (both obsolete but... meh), etc...
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
Ok so if you use the jasshelper you can still use a constant or normal function instead of a constant variable.
Because the script will be the same.
Not with the official editor ofc, but anyway you can't declare a constant variable, and Vexorian said it will be more than one line next.
So do like you want :p
 
Status
Not open for further replies.
Top