wc3edit.net
https://forum.wc3edit.net/

[Request] Tool For Separating GlobalsInit
http://forum.wc3edit.net/useful-tools-f69/tool-for-separating-globalsinit-t26455.html
Page 1 of 1

Author:  JustANewbie [ October 19th, 2012, 3:15 pm ]
Post subject:  [Request] Tool For Separating GlobalsInit

i'm requesting for a tool that can separate the trigger into part by part just like GUI trigger but in JASS

Author:  Bartimaeus [ October 19th, 2012, 5:35 pm ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

If you can read JASS, you won't really need this to begin with...

Author:  JustANewbie [ October 20th, 2012, 4:33 am ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

i can read but i can't write, i need this tool so that the script would not be too long that will confuse me and took me for hours for a trigger, for example a ability trigger

Author:  Bartimaeus [ October 20th, 2012, 6:34 am ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

I don't understand how this is going to help with that, exactly. You'll still have to either use the search function or look through the coding manually to find what you want, regardless if there's empty spaces between separate triggers...

Author:  JustANewbie [ October 20th, 2012, 2:00 pm ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

sometimes i don't even know when is a trigger start or end

Author:  Bartimaeus [ October 20th, 2012, 9:57 pm ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

function ...
endfunction

Author:  JustANewbie [ October 21st, 2012, 6:13 am ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

sometimes after endfunction just start action

Author:  Bartimaeus [ October 21st, 2012, 8:44 am ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

Really? For example?

Author:  JustANewbie [ October 21st, 2012, 12:51 pm ]
Post subject:  Re: [Request] Tool For Separating GlobalsInit

just a spell trigger

Spoiler:
function g7 takes nothing returns boolean
return(GetSpellAbilityId()=='A123')
endfunction

function G7 takes nothing returns boolean
return(IsUnitInGroup(GetTriggerUnit(),udg_group29)==false)
endfunction

function h7 takes nothing returns boolean
return(GetHeroStatBJ(1,udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)>GetHeroStatBJ(1,udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true))
endfunction

function H7 takes nothing returns nothing
call GroupAddUnit(udg_group37,GetTriggerUnit())
set udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetTriggerUnit()
set udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetSpellTargetUnit()
call PauseUnit(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
call PauseUnit(udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
call SetUnitInvulnerable(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
call SetUnitInvulnerable(udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=3
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
call SetUnitVertexColorBJ(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],100,100,100,100.)
call GF(.2)
call SetUnitPositionLocFacingLocBJ(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]),60.,60.)),GetUnitLoc(udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))
call GF(.2)
call SetUnitVertexColorBJ(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],100,100,100,.0)
call GF(.2)
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call SetUnitAnimation(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],"attack")
call GF(.2)
if(G7())then
call PauseUnit(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
endif
call PauseUnit(udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call GroupRemoveUnit(udg_group37,GetTriggerUnit())
call SetUnitInvulnerable(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
call SetUnitInvulnerable(udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],false)
if(h7())then
set udg_real01=((I2R(GetHeroStatBJ(1,udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true))-I2R(GetHeroStatBJ(1,udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],true)))*(1.*I2R(GetUnitAbilityLevelSwapped(GetSpellAbilityId(),udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]))))
call UnitDamageTargetBJ(udg_units08[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],udg_units09[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],udg_real01,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_ENHANCED)
endif
endfunction

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/