Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
How do you get a particle like missieles to rotate around a target point or unit? Is it also possable to change the height of the particle? If so, how?
You should use dummy units instead of special effects.
Dummy units should cost no food, have no vision, pathing type set to "flying", have the ability "locust" and maybe other stuff I'm forgetting.
Since you can easily change a unit's position and/or flying height, you can do what you requested.
death type - does not raise, does not decay so the unit will not leak when removed
Yes, you can just periodically move the unit around the target point using PolarProjection, if you cant make your own, there is function PolarProjectionBJ takes location source, real dist, real angle returns location
and you can call it periodically changing the angle.
So for instance if you want to rotate "effect"(unit in this case) around other unit in 800 distance over 1 second around 360 degrees, you can split it to 0.05 seconds periodic loop and changing the angle by (360 * remainingTime), and increase remainingTime every 0.05 seconds for 0.05 until its 1, then destroy it.
To move the unit you could use
JASS:
location yourUnitLoc = GetUnitLoc(the unit we want to spin around) //this can be done in GUI if you are doing it, there for sure is command for that
call SetUnitX(yourdummy, GetLocationX(PolarProjectionBJ(yourUnitLoc, 800/*distance*/, remainingAngle)))
//the same for Y
set ramainingAngle = remainingAngle + 0.05
dont forget to perform the check for 1.00
I recommend using SetUnitX/Y even if you are using GUI because it will not interupt the units order.
If you are using GUI, you will have to use either global variables or hashtable to make it MUI, hope you know how to do that
Also using PolarProjectionBJ as I did is not recommended, that will leak, you should set it to some location and then call at the end of the trigger RemoveLocation(yourUnitLoc) and also RemoveLocation(yourPolarProjection)
I know it looks more a bit code compared to PolarProjection, by using this function, it handles only coordinates (real) instead of locations, this is why in the first place why you should use JASS, else stick to GUI.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.