| 07-13-2006, 06:06 PM | #1 |
How can I make it so a created angle faces the exact angle as the dying unit was facing? Basicly as soon as this unit dies, a simular unit appears to take its place, but I want him to be facing the same direction... |
| 07-13-2006, 06:21 PM | #2 |
common.j is your friend, use it. JASS:native CreateUnit takes player id, integer unitid, real x, real y, real face returns unit constant native GetUnitFacing takes unit whichUnit returns real native SetUnitFacing takes unit whichUnit, real facingAngle returns nothing //Unnecessary if you do it in CreateUnit |
| 07-13-2006, 06:33 PM | #3 |
heh when it comes to scripting Im still pretty new to it... that file doesn't mean a heck of a lot to me, my only Jass experience is in designing campaign AI scripts, because what you just posted really doesn't make a whole lot of sense to me... As I said, my Jass skills are still very newbish and I don't understand a lot of it. So I still donno what I need to do to create my unit facing the same angle as the former dying unit. |
| 07-13-2006, 06:58 PM | #4 |
Well since your not that familiar with it yet, here is an easy way in "GUI" Trigger: You can also make it in the same trigger but then you need to save the information of the unit you want to use before it dies in variables, like this. |
| 07-13-2006, 07:21 PM | #5 |
Thanks, that worked perfectly. |
| 07-14-2006, 01:36 AM | #6 |
Add in Trigger: Custom script: call RemoveLcation(udg_point) |
| 07-14-2006, 02:57 AM | #7 |
He could probably do that throughout his whole map then =P And then he also would need to use a temppoint in the first trigger I wrote. |
