- Joined
- Dec 31, 2005
- Messages
- 712
Hello everyone!
I've been trying to make a spell that increases level with each attack. Ya, it's easy so far, but I also want to create Wisps around the hero for each level.
I'm using KaTTaNa's Local Handle Variables. I'm having trouble to keep the Group in the Attacker:
G = Group of Wisps
Counters = Number of Wisps
e001 = Wisp
When G is null, the unit is added normally, but from the second attack on, the group has no units. The variable Counters is kept normally.
I've been trying this spell since a year ago =/
Thanks for your time
Hossomi
I've been trying to make a spell that increases level with each attack. Ya, it's easy so far, but I also want to create Wisps around the hero for each level.
I'm using KaTTaNa's Local Handle Variables. I'm having trouble to keep the Group in the Attacker:
JASS:
local group G = GetHandleGroup(Caster, "Group")
local integer Counters = GetHandleInt(Caster, "Counters")
local unit U
set Counters = Counters + 1
if G == null then
set G = CreateGroup()
endif
set U = CreateUnit(GetOwningPlayer(Caster), 'e001', GetUnitX(Caster), GetUnitY(Caster), 72 * I)
call GroupAddUnit(G, U)
call SetHandleHandle(Caster, "Group", G)
call SetHandleInt(Caster, "Counters", Counters)
set G = null
set U = null
G = Group of Wisps
Counters = Number of Wisps
e001 = Wisp
When G is null, the unit is added normally, but from the second attack on, the group has no units. The variable Counters is kept normally.
I've been trying this spell since a year ago =/
Thanks for your time
Hossomi