S
shadowvzs
Guest
and? x y is coordinate in screen because is real?
bump!
i need answers
and i have more question in progress
first these jass's good, or i need fixing it? these jass's and what i post last time with item and different wing type dropping?
JASS:
function RemovePlayer10 takes nothing returns nothing
local group g
local unit u
set g = GetUnitsInRectOfPlayer(GetPlayableMapRect(), Player(9))
loop
set u = FirstOfGroup(g)
exitwhen u==null
call GroupRemoveUnit(g,u)
call RemoveUnit( u )
endloop
set g = null
set u = null
endfunction
how can i do tinki3 creep revivel system in jass with player 11,hostile?
or if i use every unit on entire map then same time ?
JASS:
function CreepLocation takes nothing returns nothing
local group g
local unit u
local integer i
set i = 0
set g = GetUnitsInRectAll(GetEntireMapRect()) <---- there player 11 and hostile or i must use again a loop and dont clear the integer value? i need best solution
loop
set u = FirstOfGroup(g)
exitwhen u==null
set i = i + 1
call GroupRemoveUnit(g,u)
set udg_CreepX<i> = GetUnitX(u)
set udg_CreepY<i> = GetUnitY(u)
endloop
set i = null
set g = null
set u = null
endfunction</i></i>
this good?
JASS:
function ReSpawn takes nothing returns nothing
local integer a = GetUnitUserData(GetDyingUnit())
local real x = udg_CreepX[a]
local real y = udg_CreepY[a]
local location loc = GetUnitLoc(GetTriggerUnit())
local effect e = AddSpecialEffectLoc( "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl", loc )
call DestroyEffect(e)
call TriggerSleepAction( 8.00 )
call TriggerSleepAction( ( ( I2R(GetUnitLevel(GetTriggerUnit())) + 1.00 ) / 2.00 ) )
call CreateNUnitsAtLoc( 1, GetUnitTypeId(GetTriggerUnit()), GetOwningPlayer(GetTriggerUnit()), OffsetLocation(GetRectCenter(GetEntireMapRect()), x, y), GetRandomDirectionDeg() )
call RemoveLocation(loc)
call SetUnitUserData( GetLastCreatedUnit(), GetUnitUserData(GetTriggerUnit()) )
call SetUnitAnimation( GetLastCreatedUnit(), "birth" )
set x = 0
set y = 0
set a = 0
set loc = null
set e = null
endfunction