- Joined
- Oct 24, 2012
- Messages
- 6,545
hello for some reason this isnt setting the unit spawned to lvl 10,000 and yes i did change max lvl in the gameplay constant lvl to 10,000 it worked fine b4 but for some reason it stopped working i may of messed something up when redoing the multiboards in my map but i cant see it atm also it always lvls the unit to 3754 not sure y hopefully someone can spot a stupid mistake or a screw up lol and thx to anyone tht helps
note: if i change the lvl from 10,000 it is doing really weird things if set to 8000 it sets the lvl as 1 if set to 9999 it sets the lvl to 3751 if set to 3755 it sets to 3755 umm not sure wat is going on here ?
JASS:
globals
trigger array trg_Run_Unit_Damage_Test_Player
real array Damage_Test_Life_Red_Reg
endglobals
function Trig_Run_Damage_Test_Red_Actions takes nothing returns nothing
local real rx = GetRectCenterX(gg_rct_red_start)
local real ry = GetRectCenterY(gg_rct_red_start)
local string color = "|r"
local multiboarditem mbi
local integer row
set Unit_Damage_Test_Player[0] = CreateUnit(Player(11), 'E001', rx, ry, 0 )
call SetHeroLevel( Unit_Damage_Test_Player[0], 10000, true )
call GroupAddUnit(Unit_Damage_Test_Group_Player[0], Unit_Damage_Test_Player[0])
set Number_of_Damage_Test_Player[0] = ( Number_of_Damage_Test_Player[0] + 1 )
set row = 1
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + I2S(Number_of_Damage_Test_Player[0]) + color )
call EnableTrigger( trg_Damage_Test_DPS_Timer_Player[0] )
call DisableTrigger( trg_Run_Unit_Damage_Test_Player[0] )
set Unit_Spawns_Player[0] = false
//setting dps for the regions
set DPS_Red_Region[1] = 0.00
set row = 6
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + R2S(DPS_Red_Region[1]) + color )
set DPS_Red_Region[2] = 0.00
set row = 7
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + R2S(DPS_Red_Region[2]) + color )
set DPS_Red_Region[3] = 0.00
set row = 8
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + R2S(DPS_Red_Region[3]) + color )
set DPS_Red_Region[4] = 0.00
set row = 9
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + R2S(DPS_Red_Region[4]) + color )
set DPS_Red_Region[5] = 0.00
set row = 10
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + R2S(DPS_Red_Region[5]) + color )
set DPS_Red_Region[6] = 0.00
set row = 11
set mbi = MultiboardGetItem( damagebossMultiboard, row, 1 )
call MultiboardSetItemValue( mbi, playerColors[0] + R2S(DPS_Red_Region[6]) + color )
set Income_Boolean_Player[0] = false //turning off income timer
set mbi = null
set color = null
endfunction
//===========================================================================
function InitTrig_Run_Damage_Test_Red takes nothing returns nothing
set trg_Run_Unit_Damage_Test_Player[0] = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( trg_Run_Unit_Damage_Test_Player[0], Player(0), "-damage test", true )
call TriggerRegisterPlayerChatEvent( trg_Run_Unit_Damage_Test_Player[0], Player(0), "-dt", true )
call TriggerAddAction( trg_Run_Unit_Damage_Test_Player[0], function Trig_Run_Damage_Test_Red_Actions )
endfunction
note: if i change the lvl from 10,000 it is doing really weird things if set to 8000 it sets the lvl as 1 if set to 9999 it sets the lvl to 3751 if set to 3755 it sets to 3755 umm not sure wat is going on here ?