Make unit face opposite angle of camera angle every 0.1s. So when i move my camera to the right, unit will turn left so i will always see back of unit. I need it for shooter thingie but kinda cant manage to do it :X
Also would appreciate a tip how to order unit move in direction its facing.
Could create a periodic event (In this case every 0.1 seconds) and all it would need is a single event.
Unit - Issue Order
Unit= the unit you want to rotate with camera angle.
( = Change to 'Order Targeting Point'.
Ability Command = Turn
Target Point = Point with Polar Offset
Point = Position of Unit
Offset = 0.1 (can be left at 1, doesn't really matter)
Towards = Camera Yaw of player
That will now make your unit always have its back facing the camera. Go to the tutorial listing and look at any of the WASD movements. They should be compatible with this. The WASD movements is just checking if the player has pressed the corresponding button and while this is true, it will keep moving the unit forward a very small amount. If you cant find anything I will show you how to do it.
i have one tutorial of those but its based on X, Y axis and its not for me cause my movements will be X, Y, Z... i cant move only by X and Y i will for example go straight to x=1 y=2 not first x=2 and then y=2 or so... kinda difficult to explain my thoughts
--
Ok... i kinda did it, unit is rotating as i wanted also it is moving towards, BUT, turning thing causes unit to issue two orders every 0.1s which are move(rotating) and stop. This continues while moving so my unit moves only by a bit so i gotta hit W continuously.. ill try to do smtn but in case i wont manage to do it, its save to be backed up here :)
--
I managed to do it but not perfectly. Right now in order to move i have to disable orders issued by rotation so...
once unit starts moving it wont rotate with camera yaw, once it stops moving it is rotating again and then i can start moving in another direction and again no rotating and so on. This effect isnt fully satisfiable.
sorry for the late reply and bump, been busy all day and because of that was unable to get back to you.
Not sure if you did get around to fixing all the problems you were experiencing so I decided to make a quick example map to show you (hopefully it works the way it does for me :P). Instead of your way of using while statements, this sets a variable to true/false and the periodic event will check the variable and move the unit accordingly.
Make unit face opposite angle of camera angle every 0.1s. So when i move my camera to the right, unit will turn left so i will always see back of unit. I need it for shooter thingie but kinda cant manage to do it :X
Also would appreciate a tip how to order unit move in direction its facing.
Kind regards
@Ditos: Go
Could create a periodic event (In this case every 0.1 seconds) and all it would need is a single event.
Unit - Issue Order
Unit= the unit you want to rotate with camera angle.
( = Change to 'Order Targeting Point'.
Ability Command = Turn
Target Point = Point with Polar Offset
Point = Position of Unit
Offset = 0.1 (can be left at 1, doesn't really matter)
Towards = Camera Yaw of player
That will now make your unit always have its back facing the camera. Go to the tutorial listing and look at any of the WASD movements. They should be compatible with this. The WASD movements is just checking if the player has pressed the corresponding button and while this is true, it will keep moving the unit forward a very small amount. If you cant find anything I will show you how to do it.
i have one tutorial of those but its based on X, Y axis and its not for me cause my movements will be X, Y, Z... i cant move only by X and Y i will for example go straight to x=1 y=2 not first x=2 and then y=2 or so... kinda difficult to explain my thoughts
--Ok... i kinda did it, unit is rotating as i wanted also it is moving towards, BUT, turning thing causes unit to issue two orders every 0.1s which are move(rotating) and stop. This continues while moving so my unit moves only by a bit so i gotta hit W continuously.. ill try to do smtn but in case i wont manage to do it, its save to be backed up here :)
--
I managed to do it but not perfectly. Right now in order to move i have to disable orders issued by rotation so... once unit starts moving it wont rotate with camera yaw, once it stops moving it is rotating again and then i can start moving in another direction and again no rotating and so on. This effect isnt fully satisfiable.
Any tips on how to do it ?
Solved ........
sorry for the late reply and bump, been busy all day and because of that was unable to get back to you.
Not sure if you did get around to fixing all the problems you were experiencing so I decided to make a quick example map to show you (hopefully it works the way it does for me :P). Instead of your way of using while statements, this sets a variable to true/false and the periodic event will check the variable and move the unit accordingly.
best of luck with the map