WolfieeifloW
WEHZ Helper
- Reaction score
- 372
I'm working on converting my map over to using GTrigger, Damage, and AIDS.
I've got some help with making my ComboPoints system use AIDS, but it's not working now.
Here's a quote from my previous combo points thread:
Here's my systems code, if someone could spot the error perhaps and also explain how/why it's not working so I can actually learn from this?
Thank you in advance, and sorry for the trouble.
I've got some help with making my ComboPoints system use AIDS, but it's not working now.
Here's a quote from my previous combo points thread:
I, honestly, don't really know how to use AIDS, but I need it for my map to use Damage.What's supposed to happen:
A unit uses a certain spell (Mangle or Claw) and gets a 'combo point'.
Combo points range from 0-5.
So, I made 6 spells with different icons/descriptions/models to represent these combo points.
When the hero uses Mangle/Claw, it's combo points get increased by 1 up to a maximum of 5.
The system removes the current combo point ability, and gives it the next rank (Again, up to 5).
Here's my systems code, if someone could spot the error perhaps and also explain how/why it's not working so I can actually learn from this?
Thank you in advance, and sorry for the trouble.
JASS:
library ComboPoints initializer onInit uses AIDS, GT
globals
integer array COMBO
public integer array Data
endglobals
private function onCast takes nothing returns boolean
local unit u = GetTriggerUnit()
local integer id
set id = GetUnitId(u)
if Data[id] != 5 then
call UnitRemoveAbility(u, COMBO[Data[id]])
set Data[id] = Data[id] + 1
call UnitAddAbility(u, COMBO[Data[id]])
endif
set u = null
return false
endfunction
private function OnInit takes nothing returns nothing
call TriggerAddCondition(GT_RegisterStartsEffectEvent(CreateTrigger(), mangle), Condition(function onCast))
call TriggerAddCondition(GT_RegisterStartsEffectEvent(CreateTrigger(), claw), Condition(function onCast))
// set up your COMBO array values
set COMBO[0] = 039;A009039;
set COMBO[1] = 039;A00E039;
set COMBO[2] = 039;A00F039;
set COMBO[3] = 039;A00G039;
set COMBO[4] = 039;A00H039;
set COMBO[5] = 039;A00I039;
endfunction
endlibrary