There a script that my friend made in vjass, this script is incomplete somehow, i cannot save it in JNGP say doesnt have an int wich is weird since its vjass...
My system gotta be able to revive unit added before and after int!!!at least at int -_-, this type of system failed in GUI and suck in jass so its need Vjass
help would be need +rep alway gived
My system gotta be able to revive unit added before and after int!!!at least at int -_-, this type of system failed in GUI and suck in jass so its need Vjass
help would be need +rep alway gived
JASS:
scope CreepRevival initializer Init
globals
private group Revivables = CreateGroup()
endglobals
private struct Revive
real x
real y
integer Id
real f
player own
private function Revive takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit n
local Revive dat = GetUnitUserData(u)
call TriggerSleepAction(5)
set n = CreateUnit(dat.own, dat.Id, dat.x, dat.y, dat.f)
call SetUnitUserData(n, dat)
set u = null
set n = null
endfunction
private function Conditions takes nothing returns boolean
return true // set your condition here
private function Set takes nothing returns nothing
local Revive dat = Revive.allocate()
local unit u = GetEnumUnit()
set dat.x = GetUnitX(u)
set dat.y = GetUnitY(u)
set dat.f = GetUnitFacing(u)
set dat.Id = GetUnitTypeId(u)
set dat.own = GetOwningPlayer(u)
set u = null
private function Init takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > 15
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_DEATH)
set i = i + 1
endloop
set Revivables = GroupEnumUnitsInRect(Revivables, bj_mapInitialPlayableArea, Condition(function Conditions))
call ForGroup(Revivables, function Set)
call TriggerAddAction(t, function Revive)
endfunction
endscope