- Joined
- Jul 4, 2008
- Messages
- 1,106
INFORMATION | CHANGELOG | ||||||||||||||||||
|
| ||||||||||||||||||
*Images, Scripts, Texts and other material are not copyrighted by OffGraphic
|
Last edited:
INFORMATION | CHANGELOG | ||||||||||||||||||
|
| ||||||||||||||||||
*Images, Scripts, Texts and other material are not copyrighted by OffGraphic
|
function applyDFXOnUnit takes string type, string visual, unit this, real duration returns nothing
function applyDFXOnUnit("fade", "bla/bla/bla.mdx", GetTriggerUnit(), 10.0)
integer array DFXUnitType
integer array DFXUnitA
integer array DFXUnitR
integer array DFXUnitG
integer array DFXUnitB
set DFXUnitType[0] = 'HFOO'
set DFXUnitA[0] = 255
set DFXUnitR[0] = 100
set DFXUnitG[0] = 25
set DFXUnitB[0] = 165
/*
=====DissipateSystem
=====Made by Mckill2009
A simple dissipate system which dissipates your units just like heroes
*/
library DissipateSystem uses T32
native UnitAlive takes unit u returns boolean
struct DissipateSystem
unit died
effect sfx
real constantheight
real height
real maxheight
real wait
real waitEx
static constant real maxHeight = 1000.
static constant real vanish = 10.
method periodic takes nothing returns nothing
if .maxheight > .height and not UnitAlive(.died) then
set .waitEx = .waitEx + T32_PERIOD
if .waitEx > .wait then
set .height = .height + vanish
call SetUnitFlyHeight(.died,.height,0)
endif
else
if UnitAlive(.died) then
call UnitRemoveAbility(.died,'Arav')
call SetUnitFlyHeight(.died,.constantheight,0)
endif
call DestroyEffect(.sfx)
set .died = null
call .destroy()
call .stopPeriodic()
endif
endmethod
implement T32x
static method applyDFXOnUnit takes unit died, string sfx, string attachment, real wait returns nothing
local thistype this
if not UnitAlive(died) and not IsUnitType(died,UNIT_TYPE_HERO) then
set this = allocate()
call UnitAddAbility(died,'Arav')
set .died = died
set .sfx = AddSpecialEffectTarget(sfx,died,attachment)
set .height = GetUnitFlyHeight(died)
set .constantheight = .height
set .maxheight = .height + maxHeight
set .wait = wait
set .waitEx = 0
call .startPeriodic()
else
debug call BJDebugMsg("This unit is alive or this unit is a hero!")
endif
endmethod
endstruct
endlibrary
Original Post said:(note: jass, not vjass)
All basics of a Tower Defence map are already implemented in the map, that meansCodric said:dude you made another tower defense or you will make
another