• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Error every attack is autocreating unit without trigger.

Status
Not open for further replies.
Level 3
Joined
May 3, 2008
Messages
29
I got this strange error out of no where i have one spell named finish buster that uses this custom unit...that has a certain model...now every time any of the units in force 1 attacks its creating this damn unit and im sure i didnt do any trigger to do this so i have no idea what the hell is happening. Any idea?
 
Level 3
Joined
May 3, 2008
Messages
29
Check the spell again..
Check attachment..
Just, check the spell again ....
The spell is in jass i dont know anything about jass...i deleted the unit from the map and now obviously it stopped..
I didnt change anything it just started with no reason. What could possibly cause such an error....only 1 unit got the ability and every time a unit in force 1 attacks its triggering it now
and alll the art- target attachments points are blank and the art - target attachments = 0.
I know its hard to help with this little information but thats all that happened this is really skrulled. ill just leave this unit removed.
if u want the spell in jass anyway here it is

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

function Trig_Kamehameha_Copy_Func004002003 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction

function Trig_Kamehameha_Copy_Func005A takes nothing returns nothing
    call CameraSetEQNoiseForPlayer( GetOwningPlayer(GetEnumUnit()), I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 2 )) )
    call CameraSetTargetNoiseForPlayer( GetOwningPlayer(GetEnumUnit()), I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 3 )), 200.00 )
endfunction

function Trig_Kamehameha_Copy_Func019Func005002003001 takes nothing returns boolean
    return ( IsPlayerAlly(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetTriggerUnit())) == false )
endfunction

function Trig_Kamehameha_Copy_Func019Func005002003002 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false )
endfunction

function Trig_Kamehameha_Copy_Func019Func005002003 takes nothing returns boolean
    return GetBooleanAnd( Trig_Kamehameha_Copy_Func019Func005002003001(), Trig_Kamehameha_Copy_Func019Func005002003002() )
endfunction

function Trig_Kamehameha_Copy_Func019Func006A takes nothing returns nothing
    call UnitDamageTargetBJ( GetLastCreatedUnit(), GetEnumUnit(), udg_LocReal, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
    call UnitAddTypeBJ( UNIT_TYPE_ANCIENT, GetEnumUnit() )
endfunction

function Trig_Kamehameha_Copy_Func019Func008Func001C takes nothing returns boolean
    if ( not ( IsDestructableAliveBJ(GetEnumDestructable()) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Kamehameha_Copy_Func019Func008A takes nothing returns nothing
    if ( Trig_Kamehameha_Copy_Func019Func008Func001C() ) then
        call KillDestructable( GetEnumDestructable() )
    else
    endif
endfunction

function Trig_Kamehameha_Copy_Func020Func002002003001 takes nothing returns boolean
    return ( IsPlayerAlly(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(GetTriggerUnit())) == false )
endfunction

function Trig_Kamehameha_Copy_Func020Func002002003002 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == true )
endfunction

function Trig_Kamehameha_Copy_Func020Func002002003 takes nothing returns boolean
    return GetBooleanAnd( Trig_Kamehameha_Copy_Func020Func002002003001(), Trig_Kamehameha_Copy_Func020Func002002003002() )
endfunction

function Trig_Kamehameha_Copy_Func020Func003A takes nothing returns nothing
    call UnitRemoveTypeBJ( UNIT_TYPE_ANCIENT, GetEnumUnit() )
endfunction

function Trig_Kamehameha_Copy_Func027A takes nothing returns nothing
    call CameraClearNoiseForPlayer( GetEnumPlayer() )
endfunction

function Trig_Kamehameha_Copy_Actions takes nothing returns nothing
    set udg_LocPoint1 = GetUnitLoc(GetSpellAbilityUnit())
    set udg_LocPoint2 = GetSpellTargetLoc()
    set udg_LocPoint3 = PolarProjectionBJ(udg_LocPoint1, 150.00, AngleBetweenPoints(udg_LocPoint1, udg_LocPoint2))
    set udg_TempUnitGroup = GetUnitsInRangeOfLocMatching(512, udg_LocPoint1, Condition(function Trig_Kamehameha_Copy_Func004002003))
    call ForGroupBJ( udg_TempUnitGroup, function Trig_Kamehameha_Copy_Func005A )
    call DestroyGroup( udg_TempUnitGroup ) 
    call AddSpecialEffectLocBJ( udg_LocPoint3, "Objects\\Spawnmodels\\NightElf\\NEDeathSmall\\NEDeathSmall.mdl" )
    call TriggerExecute( gg_trg_Destroy_Effect )
    call AddSpecialEffectLocBJ( udg_LocPoint3, "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl" )
    call TriggerExecute( gg_trg_Destroy_Effect )
    call CreateNUnitsAtLoc( 1, 'h01Z', GetOwningPlayer(GetSpellAbilityUnit()), udg_LocPoint3, AngleBetweenPoints(udg_LocPoint1, udg_LocPoint2) )
    call SetUnitScalePercent( GetLastCreatedUnit(), ( 250.00 + I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 10 )) ), ( 250.00 + I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 10 )) ), ( 250.00 + I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 10 )) ) )
    call CreateNUnitsAtLoc( 1, 'h01F', GetOwningPlayer(GetSpellAbilityUnit()), udg_LocPoint3, AngleBetweenPoints(udg_LocPoint1, udg_LocPoint2) )
    call SetUnitScalePercent( GetLastCreatedUnit(), ( 350.00 + I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 10 )) ), ( 350.00 + I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 10 )) ), ( 350.00 + I2R(( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetSpellAbilityUnit()) * 10 )) ) )
    call SetUnitTimeScalePercent( GetLastCreatedUnit(), 15.00 )
    call KillUnit( GetLastCreatedUnit() )
    call RemoveLocation( udg_LocPoint3 ) 
    set udg_LocReal = ( ( ( I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), false)) * I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit())) ) * 2.00 ) + 100.00 )
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 5
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        set udg_LocPoint3 = PolarProjectionBJ(udg_LocPoint1, ( I2R(GetForLoopIndexA()) * 200.00 ), AngleBetweenPoints(udg_LocPoint1, udg_LocPoint2))
        call SetTerrainTypeBJ( udg_LocPoint3, 'Kdtr', -1, 3, 0 )
        call SetTerrainTypeBJ( udg_LocPoint3, 'Jdtr', -1, 2, 0 )
        call CreateNUnitsAtLoc( 1, 'h01X', GetOwningPlayer(GetTriggerUnit()), udg_LocPoint3, bj_UNIT_FACING )
        set udg_TempUnitGroup = GetUnitsInRangeOfLocMatching(300.00, udg_LocPoint3, Condition(function Trig_Kamehameha_Copy_Func019Func005002003))
        call ForGroupBJ( udg_TempUnitGroup, function Trig_Kamehameha_Copy_Func019Func006A )
        call DestroyGroup( udg_TempUnitGroup ) 
        call EnumDestructablesInCircleBJ( 300.00, udg_LocPoint3, function Trig_Kamehameha_Copy_Func019Func008A )
        call RemoveLocation( udg_LocPoint3 ) 
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    set bj_forLoopAIndex = 1
    set bj_forLoopAIndexEnd = 5
    loop
        exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
        set udg_LocPoint3 = PolarProjectionBJ(udg_LocPoint1, ( I2R(GetForLoopIndexA()) * 200.00 ), AngleBetweenPoints(udg_LocPoint1, udg_LocPoint2))
        set udg_TempUnitGroup = GetUnitsInRangeOfLocMatching(300.00, udg_LocPoint3, Condition(function Trig_Kamehameha_Copy_Func020Func002002003))
        call ForGroupBJ( udg_TempUnitGroup, function Trig_Kamehameha_Copy_Func020Func003A )
        call DestroyGroup( udg_TempUnitGroup ) 
        call RemoveLocation( udg_LocPoint3 ) 
        set bj_forLoopAIndex = bj_forLoopAIndex + 1
    endloop
    set udg_LocPoint3 = PolarProjectionBJ(udg_LocPoint1, ( I2R(GetForLoopIndexA()) * 900.00 ), AngleBetweenPoints(udg_LocPoint1, udg_LocPoint2))
    call TerrainDeformationWaveBJ( 3.00, udg_LocPoint1, udg_LocPoint3, 400.00, 128.00, 1.00 )
    call RemoveLocation( udg_LocPoint1 ) 
    call RemoveLocation( udg_LocPoint2 ) 
    call RemoveLocation( udg_LocPoint3 ) 
    call TriggerSleepAction( 2 )
    call ForForce( GetPlayersAll(), function Trig_Kamehameha_Copy_Func027A )
endfunction

//===========================================================================
function InitTrig_Kamehameha_Copy takes nothing returns nothing
    set gg_trg_Kamehameha_Copy = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Kamehameha_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Kamehameha_Copy, Condition( function Trig_Kamehameha_Copy_Conditions ) )
    call TriggerAddAction( gg_trg_Kamehameha_Copy, function Trig_Kamehameha_Copy_Actions )
endfunction
 
Level 3
Joined
May 3, 2008
Messages
29
If you copy dummy spells, you'll have to change the value after copying.
The problem now is obviously that trigger creates the code of your unit..
Btw, how could you copy a JASS spell while you don't even understand it.. did you get it in illegal way? :wink:

u dont get it i just opened the map started doing some triggers, delete some unused variables then tested the map and this error started i didnt even touch the object data. and that spell was working. The spell was on gui but i didnt want to copy every line so just converted to text and copy/pasted.
how can u say "The problem now is obviously that trigger creates the code of your unit.."
 
u dont get it i just opened the map started doing some triggers, delete some unused variables then tested the map and this error started i didnt even touch the object data. and that spell was working. The spell was on gui but i didnt want to copy every line so just converted to text and copy/pasted.
how can u say "The problem now is obviously that trigger creates the code of your unit.."

You made me laugh, why should you convert it into JASS..
Quote Reason - I didn't want to copy every line
Should I actually tell you that you can straightly copy the trigger?
 
Level 3
Joined
May 3, 2008
Messages
29
You made me laugh, why should you convert it into JASS..
Quote Reason - I didn't want to copy every line
Should I actually tell you that you can straightly copy the trigger?

this has nothing to do with the trigger. Every time an unit is attacking its creating this thing there isnt any freaking event like " a unit attacks ". And only 1 unit has the ability the trigger is the normal
Unit starts the effect of an ability
ability = xxx
actions

did u invent some super technique to copy triggers on maps after they have already been made without converting to text by the way ? thats what ur saying?
 
Status
Not open for further replies.
Top