| 07-25-2008, 03:17 PM | #1 |
How much can I do inside "if GetLocalPlayer()==x then..endif" without causing desyncs.. Like, would the following work: JASS:if not IsUnitVisible (u, GetLocalPlayer ()) then call UnitAddAbility (u, 'Aloc') call ShowUnit (u, false) call UnitRemoveAbility (u, 'Aloc') call ShowUnit (u, true) endif BTW how do I put the hp bars back on? |
| 07-25-2008, 04:08 PM | #2 |
I'm fairly sure you can't add/remove abilities locally, and I'm not sure your If/then comparison would check out. And when you add/remove 'aloc', it removes health bars forever on that unit. Can't be fixed. |
| 07-25-2008, 04:18 PM | #3 |
it will desync you cant show\hide or add ability localy |
| 07-25-2008, 04:44 PM | #4 |
It is however reverted before the end of the if...test it. |
| 07-25-2008, 05:26 PM | #5 |
It my not desync right away, but the second someone tries to do something with the unit that not all other players can do, it will desync. |
| 07-25-2008, 06:14 PM | #6 |
You can't put the bar back in; though if you're seeking collisionlessness, use Ghost or Ghost (Visible) instead. Add invulnerability too if you need that also. Can't you set the local player to a variable or something? Someone did something like this but with camera positions instead, I think. |
