Warcraft III resources & community, 2003–2006 · archived

Help fizing manual spin trigger

6 posts
#1

Help fizing manual spin trigger

Spin
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SpinAngle Equal to 360.00
Then - Actions
Set SpinAngle = 0.00
Else - Actions
Set SpinAngle = (SpinAngle + 2.00)
Unit - Move Tauren Cheiften 2.0 0000 <gen> instantly to (Position of SpinCenterlocation), facing SpinAngle degrees
Unit - Move SpunUnit instantly to ((Position of SpinCenterlocation) offset by 160.00 towards ((Facing of Tauren Cheiften 2.0 0000 <gen>) + 15.00) degrees), facing (Position of Tauren Cheiften 2.0 0000 <gen>)


That's the trigger in it's implicity. The only problem is that he won't spin faster the larger i set the rotation interval. Instead he starts going the other way is if lagging....anyone know how to fix this because i'd want to make a really nice fast spinning movement rather than the slow roation that i currently have.
#2
First of all its leaking. Check the FAQ to find out more about leaks.

And what interval? The repetitive timer cannot be set down to less than 0.01. Try increasing the spin angle incrementation.

~Daelin
#3
I was told by an expert that when you go from positions of units, it stores the movemnt into x and y, which is the least leaking way for keeping a position effectively. Also i was told there was a maximum spinning speed.
#4
About the spin stuff, I don't REALLY get what you mean. Is it in the animation of the unit or just in the way you forcefully change the location of the unit?

For the leaking from, here is the script which should work. Just add a Custom Script after you refer to each position of unit blabla.

call RemoveLocation(GetUnitLoc(udg_SpinCenterlocation))

And hopefully it won't leak, lag, or cause any problems.

~Daelin
#5
I forcefully turned the unit but no matter what there's a maximum speed you can turn them despiyte anything you try to do (they WILL NOT turn any faster)

As for the leaks, i was told that when you get the location of the unit, it's stored as x and y which doesn't leak.

But if it leaks, well i'll put that in when i update my map.
#6
Surely it leaks. And if you used Polar Offset it leaks as well. Gimme the entire code and I'll make it JASS for the removal.

~Daelin