Thread: Black Hole
View Single Post
Old 11-11-2007, 03:44 PM   #7
cohadar
master of fugue
 
cohadar's Avatar
 
Join Date: Jun 2007
Posts: 2,453

Submissions (5)

cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)cohadar is just really nice (250)

Default

I will let him live for now.

Mainly because he knows how to import ABC.
(You would be surprised at the amount of people who copy whole ABC text on top of their trigger text, they think it is a macro or something!? )

He also used private actions and conditions, that is a big plus.

He did not use local trigger:
Collapse JASS:
function InitTrig_Black_Hole takes nothing returns nothing
 set gg_trg_Black_Hole = CreateTrigger(  )
 call Preload(BlackHole_FX)
 call Preload(Explode_FX)
 call Preload("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
 call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Hole, EVENT_PLAYER_UNIT_SPELL_EFFECT )
 call TriggerAddCondition( gg_trg_Black_Hole, Condition( function Conditions ) )
 call TriggerAddAction( gg_trg_Black_Hole, function Actions )
endfunction

Collapse JASS:
public function InitTrig takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call Preload(BlackHole_FX)
    call Preload(Explode_FX)
    call Preload("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
    call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trig, Condition( function Conditions ) )
    call TriggerAddAction( trig, function Actions )
endfunction

// InitTrig is public, remember that.


The greatest remark is terrible indentation of the code.
Learn to use tabs instead of spaces.
(or use 4 spaces if your editor does not support tabs)

------
This is close to being JESP, he just needs some more work.

EDIT:
You should use this for a spell icon:
ReplaceableTextures\CommandButtons\BTNGenericSpellImmunity.blp
It is an active spell after all.
__________________
Omg database crash deleted my signature, as a side effect this immensely improved wc3c.
cohadar is offline   Reply With Quote