| 03-05-2005, 01:11 PM | #1 |
GetLocationZ() actually returns the height in the terrain considering cliffs and terrain height (the one you make with the editor and is not cliffs) The only problem is that it is Async , so it may desync Any way of calling this kind of functions without desyncing? And common.j says it MAY desync, I am almost going to bet that it WOULD ONLY desync if you have Terrain Deformations only for some players, so GetLocationZ() may be not a sure desync, would need someone to test that function in multiplayer |
| 03-05-2005, 02:55 PM | #2 |
I tested it in multiplayer. I got no desync. It also detects terrain deformations due to spells like clap and shockwave. |
| 03-05-2005, 03:15 PM | #3 | |
Quote:
This means it would only desync if there are local terrain deformations, something that I've never seen anyways |
| 03-05-2005, 03:22 PM | #4 |
Don't you think local terrain deformations can cause the desync by themselves? But, as you said, I've never seen local terrain deformations :P. |
| 03-05-2005, 03:27 PM | #5 |
Actually you might be able to do them with the same trick we use to create special effects for the local player .-. BTW, how did you test it? If you just used it to show text messages it wouldn't be aproblem, you should test it with something like if it creates different numbers of units depending on the height of the terrain in a random point of the map. |
| 03-05-2005, 03:40 PM | #6 |
Oh yea, the special effect trick -.-. (GetLocalPlayer() right?) If I understand correctly you want me to test it by creating a number of units somehow related to the height of a random location. EDIT: Tested it in multiplayer, my trigger was creating footmen in random locations and their number was equal to R2I(height/32). No footmen were created in lanes with 0 height and there were some that were created in high cliffs. There was no desync. EDIT: Testing this with Local Deformations. I will give you the results in some while. Ok, tested this with Local Deformation trick: TriggerPlayer is the Player that uses the chat command. Code:
if GetLocalPlayer()==GetTriggerPlayer() then
call TerrainDeformationCraterBJ( 1.00, true, GetCameraTargetPositionLoc(), 512, 64 )
else
call TerrainDeformationCraterBJ( 0.5, false, GetCameraTargetPositionLoc(), 1.00, 0.00 )
endifI was the only one to get a deformation. Then I tried using a chat command to check the height, they got a different height on their screens. At last I tried using the Create Units depending on height and of course we got a desync because their height was equal to 0 and mine was like 100, so there was a desync with the unit handles. Hope that helps. |
| 03-07-2005, 02:56 PM | #7 |
Perfect, then GetLocationZ is safe unless you have local terrain deformations (which is not likelly to happen) |
