Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Yap thanks! ill give +rep if you made it correctly ^_^
Map init

Events


Map initialization

Conditions

Actions


Set PreLoadAbilityList[0] = Attack Speed (Gloves of Haste)


Set Point = (Random point in (Playable map area))


Unit - Create 1 Paladin for Player 1 (Red) at Point facing Default building facing degrees


Custom script: call RemoveLocation(udg_Point)


Unit - Remove (Last created unit) from the game


Visibility - Disable fog of war


Visibility - Disable black mask
function Trig_Timer_Actions takes nothing returns nothing
local integer i = 1
local integer cv
set i = 1
loop
exitwhen i > udg_CombatIndex
set cv = udg_CombatI2CV[i]
set udg_CombatTimer[cv] = udg_CombatTimer[cv] - 1
if udg_CombatTimer[cv] < 1 then
//here u can do something if timer is out
set udg_CombatTimer[cv] = 0
set udg_CombatCount[cv] = 0
if i != udg_CombatIndex then
set udg_CombatI2CV[i] = udg_CombatI2CV[udg_CombatIndex]
set udg_CombatTimer[udg_CombatI2CV[i]] = udg_CombatTimer[udg_CombatI2CV[udg_CombatIndex]]
set udg_CombatCount[i] = udg_CombatCount[udg_CombatIndex]
endif
set udg_CombatIndex = udg_CombatIndex - 1
set i = i - 1
endif
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Timer takes nothing returns nothing
set gg_trg_Timer = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Timer, 1.00 )
call TriggerAddAction( gg_trg_Timer, function Trig_Timer_Actions )
endfunction
Set Damage

Events


Game - DamageModifierEvent becomes Equal to 1.00

Conditions


DamageEventOverride Equal to False

Actions


Set PNR1 = (Player number of (Owner of DamageEventSource))


Set CV1 = (Custom value of DamageEventSource)


Floating Text - Create floating text that reads ((String((Integer(DamageEventAmount)))) + <Empty String>) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 100.00%, 10.00%), and 0.00% transparency


Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees


Floating Text - Change (Last created floating text): Disable permanence


Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds


Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds


-------- we add unit to combat timer if he isnt already there --------


-------- combat timer justa periodic trigger what decrease each second the CombatTimer[custom value of unit] by 1 --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of DamageEventSource) Equal to Sylvanas Windrunner



Then - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






CombatTimer[CV1] Less than 1





Then - Actions






Set CombatIndex = (CombatIndex + 1)






Set CombatI2CV[CombatIndex] = CV1






Set CombatCount[CV1] = 1






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Level of PreLoadAbilityList[0] for DamageEventSource) Equal to 0







Then - Actions








Unit - Add PreLoadAbilityList[0] to DamageEventSource







Else - Actions








Unit - Set level of PreLoadAbilityList[0] for DamageEventSource to 1





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








CombatCount[CV1] Less than 10







Then - Actions








Set CombatCount[CV1] = (CombatCount[CV1] + 1)








Unit - Set level of PreLoadAbilityList[0] for DamageEventSource to CombatCount[CV1]







Else - Actions




Set CombatTimer[CV1] = 5




Game - Display to (All players) the text: (((Name of DamageEventSource) + attack speed increased by ) + ((String((CombatCount[CV1] x 25))) + % in last 5 second.))



Else - Actions
the timeout sytem in your trigger is that it last 5 seconds could you please change the timeout system for the attack speed to whenever it attacks other unit or it stop.
Map init

Events


Map initialization

Conditions

Actions


Set PreLoadAbilityList[0] = Attack Speed (Gloves of Haste)


Set Point = (Random point in (Playable map area))


Unit - Create 1 Paladin for Player 1 (Red) at Point facing Default building facing degrees


Custom script: call RemoveLocation(udg_Point)


Unit - Remove (Last created unit) from the game


Visibility - Disable fog of war


Visibility - Disable black mask


-------- -------- -------- -------- settings -------- -------- -------- --------


Set IASMaxStack = 10


Set IASDuration = 5


-------- more hp to archer, else she die too fast and u cant see enough well the ias --------


-------- so this is only for test, u can remove it if u want --------


Player - Set Player 1 (Red) handicap to 10000.00%
function Trig_Timer_Actions takes nothing returns nothing
local integer i = 1
local integer cV //try to follow Bribe's JPAG on naming variables. first letter of first word is always lowercase.
//after that all first letters are uppercase, makes it more readable.
set i = 1
loop
set cV = udg_CombatI2CV[i]
set udg_CombatTimer[cV] = udg_CombatTimer[cV] - 1
if udg_CombatTimer[cV] < 1 then
//here u can do something if timer is out
set udg_CombatTimer[cV] = 0
set udg_CombatCount[cV] = 0
if i != udg_CombatIndex then
set udg_CombatI2CV[i] = udg_CombatI2CV[udg_CombatIndex]
set udg_CombatTimer[udg_CombatI2CV[i]] = udg_CombatTimer[udg_CombatI2CV[udg_CombatIndex]]
set udg_CombatCount[i] = udg_CombatCount[udg_CombatIndex]
endif
set udg_CombatIndex = udg_CombatIndex - 1
set i = i - 1
endif
set i = i + 1
exitwhen i > udg_CombatIndex //Moved exitwhen to end to make the loop end-point intuitive.
endloop
endfunction
//===========================================================================
function InitTrig_Timer takes nothing returns nothing
local trigger t = CreateTrigger() //Locals are your friend.
call TriggerRegisterTimerEvent(t, 1.00, true ) // Don't use TriggerRegisterTimerEventPeriodic as this will just
// call this function anyways.
call TriggerAddAction( t, function Trig_Timer_Actions )
set t = null //null your trigger when you're done with it so it won't allocate memory.
endfunction
Here are some changes to shadow's code.
There are some other functions in the MapInit and in your damage trigger that I don't see a reason for, but I only glanced over it for now ; ). I'll probably rewrite it later to make it more efficient, like converting all GUI globals to jass globals. I don't like the integration of regular variables and udg_VARIABLE variables, but that's just a preference.
ok let me notice that, this is NOT vjass, so dont have global exclude gui globals, i dont like the vjass and gui mix![]()
