My first Jass Spell

rodead

Active Member
Reaction score
42
this is my first Jass Spell anything that i can make better?
or tips?
or things that i need to learn?
everything is welcome...

JASS:
function Trig_Frozen_Wave_1_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A003' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Frozen_Wave_1_Actions takes nothing returns nothing
    set udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = GetUnitLoc(GetSpellAbilityUnit())
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 0.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 30.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 60.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 90.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 120.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 150.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 180.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 210.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 240.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 270.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 300.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetSpellAbilityUnit()), udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 330.00 )
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 256, GetUnitFacing(GetLastCreatedUnit()))
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit())) + 12 )] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 1])
endfunction

//===========================================================================
function InitTrig_Frozen_Wave_1 takes nothing returns nothing
    set gg_trg_Frozen_Wave_1 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Frozen_Wave_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Frozen_Wave_1, Condition( function Trig_Frozen_Wave_1_Conditions ) )
    call TriggerAddAction( gg_trg_Frozen_Wave_1, function Trig_Frozen_Wave_1_Actions )
endfunction


JASS:
function Trig_Frozen_Wave_2_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Frozen_Wave_2_Actions takes nothing returns nothing
    set udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] = GetUnitLoc(GetDyingUnit())
    set udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit())) + 12 )] = PolarProjectionBJ(udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], 800.00, ( 180.00 + GetUnitFacing(GetDyingUnit()) ))
    call CreateNUnitsAtLocFacingLocBJ( 1, 'h003', GetOwningPlayer(GetDyingUnit()), udg_Frozen_Wave_Point[( GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit())) + 12 )], udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
    call IssuePointOrderLocBJ( GetLastCreatedUnit(), "shockwave", udg_Frozen_Wave_Point[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 13])
    call RemoveLocation (udg_Frozen_Wave_Point[GetPlayerId( GetOwningPlayer( GetSpellAbilityUnit() ) ) + 1])
endfunction

//===========================================================================
function InitTrig_Frozen_Wave_2 takes nothing returns nothing
    set gg_trg_Frozen_Wave_2 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Frozen_Wave_2, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Frozen_Wave_2, Condition( function Trig_Frozen_Wave_2_Conditions ) )
    call TriggerAddAction( gg_trg_Frozen_Wave_2, function Trig_Frozen_Wave_2_Actions )
endfunction


JASS:
function Trig_Frozen_Wave_3_Func001002002 takes nothing returns boolean
    return ( UnitHasBuffBJ(GetFilterUnit(), 'B000') == true )
endfunction

function Trig_Frozen_Wave_3_Func002A takes nothing returns nothing
    call UnitDamageTargetBJ( udg_Hero, GetEnumUnit(), ( ( I2R(GetHeroStatBJ(bj_HEROSTAT_INT, udg_Hero, true)) / 10.00 ) / 2.50 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction

function Trig_Frozen_Wave_3_Actions takes nothing returns nothing
    set udg_Frozen_Wave_Group = GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Frozen_Wave_3_Func001002002))
    call ForGroupBJ( udg_Frozen_Wave_Group, function Trig_Frozen_Wave_3_Func002A )
    call DestroyGroup (udg_Frozen_Wave_Group) 
endfunction

//===========================================================================
function InitTrig_Frozen_Wave_3 takes nothing returns nothing
    set gg_trg_Frozen_Wave_3 = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Frozen_Wave_3, 0.10 )
    call TriggerAddAction( gg_trg_Frozen_Wave_3, function Trig_Frozen_Wave_3_Actions )
endfunction
 

Frozenhelfir

set Gwypaas = Guhveepaws
Reaction score
56
Yes, I'll do a few basics. Firstly, you should provide a summary of what the function/trigger does if its long. Is frozen wave supposed to be kind of like a nova where it goes in all directions? Anyway, you can replace all of the CreateNUnitsAtLoc with CreateUnit.

The following changes can be made to your conditions:
JASS:
function Trig_Frozen_Wave_1_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'A003' ) ) then
        return false
    endif
    return true
endfunction


This makes it all in one line, easier to read and write.
JASS:
function Trig_Frozen_Wave_1_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A003'
endfunction


==================================================

Likewise, this one can also be changed

JASS:
function Trig_Frozen_Wave_2_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetDyingUnit()) == 'h000' ) ) then
        return false
    endif
    return true
endfunction


JASS:
function Trig_Frozen_Wave_2_Conditions takes nothing returns boolean
    return GetUnitTypeId(GetDyingUnit()) == 'h000'
endfunction

Also, the first trigger is pretty robust with repetitive actions, and that global location can probably also be a local one. So a loop can be used, one second while I add this...

Also, I highly recommend you download JASS NewGen found in the sticky at the top of this forum. I'll be re-writing your first trigger to use this since it really makes things much easier and neater.

EDIT: Here's the trigger revamped :D

JASS:
scope FrozenWave1 initializer init
//REMEMBER TO NAME THE TRIGGER TO FrozenWave1 AT THE LEFT SIDEBAR!!! CASE SENSETIVE
private function Cond takes nothing returns boolean
    return GetSpellAbilityId() == 'A003'
endfunction


private function Act takes nothing returns nothing
local integer id = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local integer i = 0
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local unit u
local location k


    loop
    //this loop should create 12 units like your trigger did, and have them 'shockwave' every 30 degrees covering all 360.
    //tihs is much easier to read, and a little more effecient because it uses more natives <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin    :D" loading="lazy" data-shortname=":D" />
        set k = PolarProjectionBJ(GetUnitLoc(target), 200, i*30)
        set u = CreateUnit(Player(id), &#039;h000&#039;, GetUnitX(caster),GetUnitY(caster), AngleBetweenPoints(GetUnitLoc(caster),k))
        call IssuePointOrder(u,&quot;shockwave&quot;,GetLocationX(k),GetLocationY(k))
        call UnitApplyTimedLife(u, &#039;BTLF&#039;, 2.00)
        call RemoveLocation(k)
        exitwhen i &gt;= 11
        set i = i+1
    endloop
set u = null
set k = null
set caster = null
set target = null
endfunction

//===========================================================================
private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition(t, Condition(function Cond))
    call TriggerAddAction(t, function Act)
endfunction
endscope
 

rodead

Active Member
Reaction score
42
thanks, also for the tips. btw i allready had newgens... :cool:

but well don't really know how it works.

i will change those things you said :)

and +rep for helping me
 

Frozenhelfir

set Gwypaas = Guhveepaws
Reaction score
56
It works just like your normal world editor, it only really influences the trigger editor. It extends the functionality of JASS and provides a nifty syntax highlighter.

If you want to improve further, look for all the red functions and control-click them. Red functions call other functions, and control clicking them brings up a function list which shows you the functions it calls. Keep converting them until you're mostly just using natives. It's ok to keep some BJ's, but its best to cut down on them as much as possible.

@Saw, looks like I learn something new every day :D
 

Romek

Super Moderator
Reaction score
963
Did you actually do any Jass yourself?
It looks like 100% converted GUI. (Heck, 3 different scripts for 1 spell is just pure GUIness)
 

rodead

Active Member
Reaction score
42
sorry for dubbel post :S but i have another question.

i am trying to make a new jass spell but this time 100% custom but i don't understand how to create a unit at a certain location. i got this right now:

JASS:
set dummy = (CreateUnitAtLoc(id), &#039;h004&#039;, (dummylocation), (0)) return unit


if you need the whole code this is what i got
JASS:
scope Iceclap1 initializer init

private function rodead takes nothing returns boolean
return GetSpellAbilityId() == &#039;A005&#039;
endfunction

private function rodead2 takes nothing returns nothing 
local integer id = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
local unit caster = GetTriggerUnit()
local unit dummy
local location dummylocation

set dummylocation = GetUnitLoc(caster)
set dummy = (CreateUnitAtLoc(id), &#039;h004&#039;, (dummylocation), (0)) return unit
//===========================================================================
private function init takes nothing returns nothing
    local trigger d = CreateTrigger(  )
    call TriggerAddAction( gg_trg_IceClap1, function Trig_IceClap1_Actions )
    call TriggerRegisterAnyUnitEventBJ(d, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition(d, Condition(function Cond))
    call TriggerAddAction(d, function Act)

    
    endfunction
endscope
 
Reaction score
341
this is my first Jass Spell anything that i can make better?

Everything :p

set dummy = (CreateUnitAtLoc(id), 'h004', (dummylocation), (0)) return unit

What the hell??? anyways i fixed up your trigger a lot, there were so much things wrong with it, just look at it and compare the two, try studying it.

JASS:
scope Iceclap1 initializer init

private function rodead takes nothing returns boolean
    return GetSpellAbilityId() == &#039;A005&#039;
endfunction

private function rodead2 takes nothing returns nothing 
    local integer id = GetPlayerId(GetOwningPlayer(GetTriggerUnit()))
    local unit caster = GetTriggerUnit()
    local real dx = GetUnitX(caster)
    local real dy = GetUnitY(caster)
    local unit dummy = CreateUnit(id, &#039;h004&#039;, dx, dy, 0.00)
//===========================================================================
private function init takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(d, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction(t, function rodead2 )
    call TriggerAddCondition(r, Condition(function rodead))
endfunction

endscope



Also... stop wasting time and get jass new gen.
 
Reaction score
341
All you have to say after all the work i went through :p

Anyways.... Good luck. If you need more of an explanation just reply.

Also if you have JASS New Gen, hit save so JassHelper can give you errors, don't use syntax button.

EDIT:

So i don't sound like a jackass, but thanks anyways wasn't there when i replied :p
 

saw792

Is known to say things. That is all.
Reaction score
280
You forgot the 'endfunction' there, TriggerHappy.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top