| 08-27-2007, 11:02 AM | #1 |
Hello :P Ive got strangle problem with spell that knockbacks target. Didnt really want to use some systems so tried to make easier thing on my own... this is first part. Trigger: Trigger: ![]() Push StreamThis is something like initialize part :P And here goes main code: JASS:function motion takes integer i returns nothing local unit u = udg_u[i] local location p = GetUnitLoc(u) local location p2 = udg_PushPoint[i] local real a local effect e = null if DistanceBetweenPoints(p, p2) > 0 and ( not ( TimerGetRemaining(GetLastCreatedTimerBJ()) < 0.20 ) ) then set a = AngleBetweenPoints(p, p2) call MoveLocation(p, GetLocationX(p) + 1 * CosBJ(a), GetLocationY(p) + 1 * SinBJ(a)) call SetUnitPositionLoc( u, p ) else set udg_u[i]=udg_u[udg_num] set udg_i = udg_i-1 set udg_num = udg_num -1 call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" ) set e = GetLastCreatedEffectBJ() call PolledWait( 2 ) call DestroyEffectBJ( e ) endif set u = null call RemoveLocation(p) call RemoveLocation(p2) set p = null set p2 = null set a = 0 endfunction (ugh, i know that timer leak, but its not main problem, ill fix that later) Well here is my problem - something strange is with unit moving oO It moves not to PushPoint, but to strange point in my map. I thnk this point is 0,0 coordinates. With any point errors in my triggers, these points move to this spot. Dunno why. So, can someone tell me where is point error here? oO P.S. Someone told me that problem is in event... Ugh? |
| 08-28-2007, 07:08 AM | #2 |
if it is moving to 0,0 then it means that the point is not a valid one ;P) |
| 08-28-2007, 08:52 AM | #3 |
Ugh i see now lol. Fixed problem. lol thanks. |
