When I click ctrl+F9, the map doesn't start, warcraftIII does and send me to main page.
I use NewGen.
Here's my spell code.
I use NewGen.
Here's my spell code.
JASS:
scope Blink_strike initializer init
globals
//Editables constans
private constant string MDL = "Abilities\\Spells\\Human\\Slow\\SlowCaster.mdl"
private constant integer SPELL_ID = 039;A000039; //Spell id
private constant attacktype ATK = ATTACK_TYPE_HERO
private constant damagetype DTP = DAMAGE_TYPE_NORMAL
private constant weapontype WTP = WEAPON_TYPE_WHOKNOWS
endglobals
function C takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
function A takes nothing returns nothing
local unit t = GetSpellAbilityUnit()
local unit c = GetTriggerUnit()
local real x = GetUnitX( t)
local real y = GetUnitY( t)
local integer i = GetUnitAbilityLevel( c, SPELL_ID)
local real dmg = 100 * I2R( i)
call SetUnitX( c, x)
call SetUnitY( c, y)
call AddSpecialEffect( MDL039; x, y)
call UnitDamageTarget( c, t, dmg, true, false, ATK, DTP, WTP)
set t = null
set c = null
endfunction
//===========================================================================
function InitTrig_Myspell takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function C))
call TriggerAddAction( t, function A )
endfunction
endscope