- Joined
- Jul 4, 2008
- Messages
- 1,106
So yeah, I thought it would be time to finally start the enchanted edition of my Death System. Currently I've overcome a few minor bugs in the Jass, but that's nothing that can't be prevented as I really haven't been doing much with Warcraft 3 lately, atleast not anything this big.
I'd appreciate if anyone could help me on checking the script(s) for errors.
I'd appreciate if anyone could help me on checking the script(s) for errors.
included all versions on a hidden tag
JASS:
// OGDSv2.011
function INIT_OGDS takes nothing returns nothing
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Default Locals ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local integer i = 0
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Value of MI ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local integer MI = udg_OGDS_MI
local integer MI_CHANGE = 6346
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Units ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local unit DYING_UNIT = GetTriggerUnit()
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Fade Color Set-ups ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local real FADE_ALPHA = 0
local real FADE_RED = 0
local real FADE_GREEN = 0
local real FADE_BLUE = 0
local real FOR_ALPHA = 0
local real FOR_RED = 0
local real FOR_GREEN = 0
local real FOR_BLUE = 0
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Preset Unit Count ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Set this to the amount of custom unit types with modified colors. ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local integer SFX_COUNT = 3
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Preset Unit Types ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local integer array SFX_DYING_UNIT
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Preset Fade Colors ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
local real array SFX_FADE_ALPHA
local real array SFX_FADE_RED
local real array SFX_FADE_GREEN
local real array SFX_FADE_BLUE
local real array SFX_FOR_ALPHA
local real array SFX_FOR_RED
local real array SFX_FOR_GREEN
local real array SFX_FOR_BLUE
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤ CONFIGURATION ¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Preset Unit Types
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_DYING_UNIT[0] = 'h000'
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_FADE_ALPHA[0] = 255
set SFX_FADE_RED[0] = 255
set SFX_FADE_GREEN[0] = 0
set SFX_FADE_BLUE[0] = 0
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_FOR_ALPHA[0] = 5
set SFX_FOR_RED[0] = 5
set SFX_FOR_GREEN[0] = 0
set SFX_FOR_BLUE[0] = 0
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_DYING_UNIT[1] = 'h001'
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_FADE_ALPHA[1] = 255
set SFX_FADE_RED[1] = 0
set SFX_FADE_GREEN[1] = 255
set SFX_FADE_BLUE[1] = 0
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_FOR_ALPHA[1] = 5
set SFX_FOR_RED[1] = 0
set SFX_FOR_GREEN[1] = 5
set SFX_FOR_BLUE[1] = 0
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_DYING_UNIT[2] = 'h002'
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_FADE_ALPHA[2] = 255
set SFX_FADE_RED[2] = 0
set SFX_FADE_GREEN[2] = 0
set SFX_FADE_BLUE[2] = 255
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
set SFX_FOR_ALPHA[2] = 5
set SFX_FOR_RED[2] = 0
set SFX_FOR_GREEN[2] = 0
set SFX_FOR_BLUE[2] = 5
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Check if Hashtable isset. ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
if ( udg_OGDS == null ) then
set udg_OGDS = InitHashtable()
endif
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Do setups. ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
// ¤¤ Hashtable Slot Information ¤¤
// ¤¤ MI: Main Index, required for OGDS to work and therefore initializes ¤¤
// ¤¤ itself when the trigger is ran. If MI hits 0, the hashtable will ¤¤
// ¤¤ flush and clear all the data. Edit @beginning of the trigger. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 1 of MI: ¤¤
// ¤¤ Value of the loop, used in the OGDS Loop to cause actions. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 2 of MI: ¤¤
// ¤¤ The Index, raises with MI and will not decrease unless MI hits 0. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 3 of MI: ¤¤
// ¤¤ Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 4 of MI: ¤¤
// ¤¤ Alpha Value of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 5 of MI: ¤¤
// ¤¤ Red value of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 6 of MI: ¤¤
// ¤¤ Green value of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 7 of MI: ¤¤
// ¤¤ Blue value of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 8 of MI: ¤¤
// ¤¤ Alpha modifier of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 9 of MI: ¤¤
// ¤¤ Red modifier of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 10 of MI: ¤¤
// ¤¤ Green modifier of Dying Unit. ¤¤
// ¤¤ ¤¤
// ¤¤ Slot 11 of MI: ¤¤
// ¤¤ Blue modifier of Dying Unit. ¤¤
// ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
endfunction
function InitTrig_OGDSEE takes nothing returns nothing
local trigger t = gg_trg_OGDSEE
set t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( t, function INIT_OGDS )
endfunction
JASS:
// OGDSv2.000
function INIT_OGDS takes nothing returns nothing
// DEFLOCALS
// -- System Indexing
local integer OGDS = 0
local integer OGDS_Index = 0
local integer OGDS_MainIndex = 0
// -- Units
local unit array OGDS_DYING_UNIT
// -- Fading formula
local real OGDS_DO_FADE = OGDS_RED() / OGDS_BLUE() / OGDS_GREEN()
// -- Fade Color Set-ups
local real array OGDS_FADE_ALPHA
local real array OGDS_FADE_RED
local real array OGDS_FADE_GREEN
local real array OGDS_FADE_BLUE
// -- Preset Unit Count
local integer OGDS_SFX_COUNT = 0
// -- Preset Unit Types
local unittype array OGDS_SFX_DYING_UNIT
// -- Preset Fade Colors for Preset Unit Types
local real array OGDS_SFX_FADE_ALPHA
local real array OGDS_SFX_FADE_RED
local real array OGDS_SFX_FADE_GREEN
local real array OGDS_SFX_FADE_BLUE
// CONFIGURATION
// -- Preset Unit Types
set OGDS_SFX_DYING_UNIT[0] = 'h000'
set OGDS_SFX_FADE_ALPHA[0] = 255
set OGDS_SFX_FADE_RED[0] = 255
set OGDS_SFX_FADE_GREEN[0] = 0
set OGDS_SFX_FADE_BLUE[0] = 0
set OGDS_SFX_DYING_UNIT[0] = 'h001'
set OGDS_SFX_FADE_ALPHA[0] = 255
set OGDS_SFX_FADE_RED[0] = 0
set OGDS_SFX_FADE_GREEN[0] = 255
set OGDS_SFX_FADE_BLUE[0] = 0
set OGDS_SFX_DYING_UNIT[0] = 'h002'
set OGDS_SFX_FADE_ALPHA[0] = 255
set OGDS_SFX_FADE_RED[0] = 0
set OGDS_SFX_FADE_GREEN[0] = 0
set OGDS_SFX_FADE_BLUE[0] = 255
// Check if Hashtable isset.
if ( udg_OGDS_DATATABLE != null ) then
// Switch
// Initialize
// Run
else
set udg_OGDS_DATATABLE = InitHashtable()
endif
endfunction
function OGDS_RED takes nothing returns real
return 0.00
endfunction
function OGDS_GREEN takes nothing returns real
return 0.00
endfunction
function OGDS_BLUE takes nothing returns real
return 0.00
endfunction
function InitTrig_OGDS_Trigger takes nothing returns nothing
local trigger t = CreateTrigger()
// Yes, that's a bj.
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( t, function INIT_OGDS )
endfunction
Last edited: