[Request] Tool For Separating GlobalsInit

Any tool that you think is useful, make a thread here and upload it.

Moderator: Cheaters

Forum rules
While crediting should be allowed, please keep down the advertising. If you know who it's from, and they have a website, please link to it as a basic courtesy.
Post Reply
JustANewbie
Forum Spammer
Posts: 551
Joined: August 18th, 2012, 2:32 am

[Request] Tool For Separating GlobalsInit

Post by JustANewbie »

i'm requesting for a tool that can separate the trigger into part by part just like GUI trigger but in JASS
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 5015
Joined: November 19th, 2007, 5:05 am

Re: [Request] Tool For Separating GlobalsInit

Post by Bartimaeus »

If you can read JASS, you won't really need this to begin with...
JustANewbie
Forum Spammer
Posts: 551
Joined: August 18th, 2012, 2:32 am

Re: [Request] Tool For Separating GlobalsInit

Post by JustANewbie »

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
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 5015
Joined: November 19th, 2007, 5:05 am

Re: [Request] Tool For Separating GlobalsInit

Post by Bartimaeus »

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...
JustANewbie
Forum Spammer
Posts: 551
Joined: August 18th, 2012, 2:32 am

Re: [Request] Tool For Separating GlobalsInit

Post by JustANewbie »

sometimes i don't even know when is a trigger start or end
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 5015
Joined: November 19th, 2007, 5:05 am

Re: [Request] Tool For Separating GlobalsInit

Post by Bartimaeus »

function ...
endfunction
JustANewbie
Forum Spammer
Posts: 551
Joined: August 18th, 2012, 2:32 am

Re: [Request] Tool For Separating GlobalsInit

Post by JustANewbie »

sometimes after endfunction just start action
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 5015
Joined: November 19th, 2007, 5:05 am

Re: [Request] Tool For Separating GlobalsInit

Post by Bartimaeus »

Really? For example?
JustANewbie
Forum Spammer
Posts: 551
Joined: August 18th, 2012, 2:32 am

Re: [Request] Tool For Separating GlobalsInit

Post by JustANewbie »

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
Post Reply