- Joined
- Dec 31, 2006
- Messages
- 15
This spell is meant to switch location and hp percent with another unit. It also has a casting time. However, nothing is really working. The opposite unit gets my current life, but nothing happens to mine. Positions don't even switch, and I think its because Target Unit of ability being cast didnt keep its value. I tried assigning them to a variable but then absolutely nothing happened.
yes i know it leaks, but i will fix those later
Code:
SoulSwap
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Soul Swap
Actions
Set anyPos2 = (Position of (Target unit of ability being cast))
Set anyPos = (Position of (Triggering unit))
Set anyInt2 = (Integer((Percentage life of (Target unit of ability being cast))))
Set anyInt = (Integer((Percentage life of (Triggering unit))))
Unit - Set life of (Triggering unit) to (Real(anyInt2))%
Unit - Set life of (Target unit of ability being cast) to (Real(anyInt))%
Unit - Move (Target unit of ability being cast) instantly to anyPos
Unit - Move (Triggering unit) instantly to anyPos2
yes i know it leaks, but i will fix those later