- Joined
- Feb 27, 2010
- Messages
- 184
Hello, I'm making a spell for my hero arena (Icecrown Arena, work in progress), where a hero gets bound onto an enemy for a few seconds, keeping him in a 550 distance with the enemy. I've based the spell on a Channel and triggered it and it all seems to work, except for moving the lightning effect. For some reason, the source of the lightning remains on the casting location (even though the target location is getting changed correctly).
This is how the spell looks when Gnoll casts it on Pit Lord and a few seconds pass:
Note: I'm making the spell MUI -> every variable is marked by the triggering player's number (every player can have max 1 hero, but other players can use the same heroes), so it is a little cluttered, sorry for that. And I'm not using hashtables,which I probably should've but I don't feel like changing it now. The spell is WIP, some stuff will be updated, e.g. the lightning height.
Here is the code:
It seems that instead of new ChainUpX1, ChainUpY1 and ChainUpZ1, old values are used throughout the spell. However, X2, Y2 and Z2 work correctly. More interestingly, I tried logging the ChainUpX1 values, it has the correct updated value right before the MoveLightning command, so I suspect the problem is somewhere in it.
Does anyone know what can be done about this? Is the problem on Blizzard side, or am I misunderstanding something? Thanks for any help!
This is how the spell looks when Gnoll casts it on Pit Lord and a few seconds pass:

Note: I'm making the spell MUI -> every variable is marked by the triggering player's number (every player can have max 1 hero, but other players can use the same heroes), so it is a little cluttered, sorry for that. And I'm not using hashtables,which I probably should've but I don't feel like changing it now. The spell is WIP, some stuff will be updated, e.g. the lightning height.
Here is the code:

It seems that instead of new ChainUpX1, ChainUpY1 and ChainUpZ1, old values are used throughout the spell. However, X2, Y2 and Z2 work correctly. More interestingly, I tried logging the ChainUpX1 values, it has the correct updated value right before the MoveLightning command, so I suspect the problem is somewhere in it.
Does anyone know what can be done about this? Is the problem on Blizzard side, or am I misunderstanding something? Thanks for any help!