you cant set unit facing instantly using 'Unit - Set Facing Angle', instead use the command SetUnitX/Y then face that particular angle or move unit instantly then face...
Actually, there is no way to set instant facing. A possible workaround used by dummy recycler systems here is storing dummies with different facing angles and when the system needs a new dummy for a particular angle, it will find a dummy with a current facing angle closest to the required value and adjust it accordingly. Thus you will have an (almost) instant facing.
There is also a SetUnitLookAt way but I am not really sure about the way it works.
hmm.. I`ll try this function. But can I also replace unit with required facing without recyclers?
Btw I want to make wall-bouncing units
You can't do so I am afraid. As said there is still this SetUnitLookAt method and you can experiment with this a bit and see if you can yield any notable results.
Off-topic: 1111th post Time to take a screenshot :>
You can use replace unit. That is a pretty nice method if you don't want to use systems.
However, you just have to be careful about things that are saved--items, stat mods, anything that is saved under their hashtable ID, etc.. Also note that there are some floating rumors about units and memory being left over ([sarcasm]shh don't tell anyone but you might have issues after 100,000 units were created and removed[/sarcasm]).
Creating units is also a pretty expensive operation, but since you are only doing it when they bounce on the walls, it shouldn't be that bad.
tl;dr if you can make it work with replacing units--then try it. It is a clean option visual wise, especially if you are dealing with actual units. If you are using dummies or effects that are bouncing, then you should resort to a dummy system for sure.
Xonok post a native some topic ago ...
EDIT : Doomlord listed it x)
EDIT : OH YA DOOMLORD ACHIEVEMENT.
native SetUnitLookAt takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing
SetUnitLookAt is the native.
native SetUnitLookAt takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing
You can't do so I am afraid. As said there is still this SetUnitLookAt method and you can experiment with this a bit and see if you can yield any notable results.
Off-topic: 1111th post Time to take a screenshot :>
Congrats again dude xD.