Hero
─║╣ero─
- Reaction score
- 250
Orb System
This is my Orb System. Inspired by my Sample Orbs map...yes I inspired myself..
Features:
-An easy way to create STACKABLE orbs
-Easy to implement
-Easy to edit
-Features 2 different types of orb cast
-Examples to show you how to use the system
-Fully documented
-Completely MUI
-Completely Leak-free (should be)
Credits To:
Emjlr3 for his Attack Detection System
Vexorian for the CS Cache
Hero12341234
Download Below:
Comments, and Feedback are highly appreciated
This is my Orb System. Inspired by my Sample Orbs map...yes I inspired myself..
Features:
-An easy way to create STACKABLE orbs
-Easy to implement
-Easy to edit
-Features 2 different types of orb cast
-Examples to show you how to use the system
-Fully documented
-Completely MUI
-Completely Leak-free (should be)
Code:
[B][U]Implementation[/U][/B]
Copy From
//===============ORB SYSTEM START================
to
//===============ORB SYSTEM END==================
and paste it in your map header
___________________________________
Create These Variables:
___________________________________
Name Type Array
-----------------------------------------------------------------------
cscache gamecache --
___________________________________
In your Map Initialization trigger add this
Custom script: call DamDetect_Init()
Look for
constant function DummyUnitRawCode takes nothing returns integer
return 'u001'
endfunction
in the header and change the 'u001' to the raw code of your dummy unit
JASS:
The System Itself:
constant function DummyUnitRawCode takes nothing returns integer
return 039;u001039;
endfunction
function OS_WithTargetCast takes unit caster, unit target, integer chance, string spellstring, integer orbability returns nothing
local integer random=GetRandomInt(1,100)
local unit dummy=CreateUnit(GetOwningPlayer(caster),DummyUnitRawCode(),GetUnitX(caster),GetUnitY(caster),0)
call UnitApplyTimedLife(dummy,039;BTLF039;,5.00)
if random<=chance then
call UnitAddAbility(dummy,orbability)
call IssueTargetOrder(dummy,spellstring,target)
endif
set dummy=null
endfunction
function OS_InstantCast takes unit caster, integer chance, string spellstring, integer orbability returns nothing
local integer random=GetRandomInt(1,100)
local unit dummy=CreateUnit(GetOwningPlayer(caster),DummyUnitRawCode(),GetUnitX(caster),GetUnitY(caster),0)
call UnitApplyTimedLife(dummy,039;BTLF039;,5.00)
if random<=chance then
call UnitAddAbility(dummy,orbability)
call IssueImmediateOrder(dummy,spellstring)
endif
set dummy=null
endfunction
Credits To:
Emjlr3 for his Attack Detection System
Vexorian for the CS Cache
Hero12341234
Download Below:
Comments, and Feedback are highly appreciated