Greets!
This spell (called "Split Half") wont work as it is supposed to. The spell is supposed to make an illusion of the target and then do 50% of the targets health to both of them. Then if the illusion is killed, the target recives another 250 dmg. What it does ingame is :
1. Creates an illusion
2. sets the targets hp to ((Life of targets HP) / 2)
3. sets the illusions HP equal to the targets HP
4. it doesn't run the "Split half extra dmg" when illusion is killed
So in short words; the main thing work but when the illusion is killed nothing happends. Also, the illusion does not change owner -.-. I can't see the problem in here, please help me!
---- Triggers ---
This spell (called "Split Half") wont work as it is supposed to. The spell is supposed to make an illusion of the target and then do 50% of the targets health to both of them. Then if the illusion is killed, the target recives another 250 dmg. What it does ingame is :
1. Creates an illusion
2. sets the targets hp to ((Life of targets HP) / 2)
3. sets the illusions HP equal to the targets HP
4. it doesn't run the "Split half extra dmg" when illusion is killed
So in short words; the main thing work but when the illusion is killed nothing happends. Also, the illusion does not change owner -.-. I can't see the problem in here, please help me!
---- Triggers ---
Trigger:
- Split Half sets
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Split Half
- Actions
- -------- Sets --------
- Set sh_caster = (Casting unit)
- Set sh_target = (Target unit of ability being cast)
- Unit Group - Pick every unit in (Units within 256.00 of (Position of sh_caster) matching (((Matching unit) is an illusion) Equal to True)) and do (Actions)
- Loop - Actions
- Set sh_fake = (Picked unit)
- Unit - Change ownership of (Picked unit) to (Owner of sh_target) and Change color
- Loop - Actions
- Unit - Set life of sh_target to ((Life of sh_target) / 2.00)
- Unit - Set life of sh_fake to (Life of sh_target)%
- Events
Trigger:
- Split Half extra dmg
- Events
- Unit - A unit Dies
- Conditions
- (Triggering unit) Equal to sh_fake
- Actions
- Unit - Set life of sh_target to ((Life of sh_target) - 250.00)
- Events