HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

GetLocalPlayer() Minimap "unit icons" & no Desync

08-18-2010, 02:32 PM#1
Darkrider
I didn't know which title to use but nvm.

I want to share with community that i found a way to create 2 different units locally without desyncing. They differ in 1 aspect only => Hide minimap display yes/no

I created a dummy unit like any other + i added neutral invulnerability.

Cpoy pasted it and modified the new one to show hero minimap icon.

then i did this

set unit_type = NoIconUnit
if player 1 == GetLocalPlayer() then
set unit_type = IconUnit

create unit_type for player 1 at x location


result: Player 1 has a unit with minimap icon and other players don't. But the most important thing is that other players didn't get desynchronized. (severally tested it on bnet)

I also tested removing, killing, moving, variable assigning them globally and no desync found so far.

Hope this can help somebody
08-18-2010, 02:55 PM#2
Fledermaus
Try doing a GetUnitTypeId on it, I bet that'd desync..
08-18-2010, 03:09 PM#3
Darkrider
its very likely to. Will test ASAP

For specific things this might be helpful though :P
08-18-2010, 04:56 PM#4
DioD
you test it wrong, it desync.
08-18-2010, 06:04 PM#5
Darkrider
try it yourself. It doesn't... it isn't hard to do

i want to test more things. If i can make them work i'll post my test map later

EDIT: I found a way to make it stable. You can check my test map here

It works online and doesn't desync. But im not quite sure on how stable this is. It survived my testings

You may wander why i used a different unit to show the icons globally... The reason is that if i use the same unit i use locally to display the minimap icons it desynced. But with a different unit it does not.

Check the map and make some comments ^^

PS: I think the map requires JNGP
Attached Files
File type: w3xDesync Test.w3x (24.6 KB)
08-21-2010, 12:05 AM#6
Darkrider
Ok. Now im pretty sure it doesn't desync. Though i haven't tried it with different fields, i will do it in a future.
09-14-2010, 09:21 PM#7
Strilanc
This sounds somewhat plausible.

Assuming the game doesn't use the unit's type (directly) for computing the state checksum, and the hero icon doesn't use any game-object-ids (not the same as handle id), the difference would not be detected (or matter). You might also be able to change other unimportant-to-game-state properties, like the model.

This could cause problems later on, though. If a trigger tested for only one of the unit types, and performed a game-state-affecting action, you would have a hard-to-see desync.
09-16-2010, 10:24 PM#8
Toadcop
yes and ? O_O

TcX AOS abuse this -_-
well i can't find working screens but you can localy change visualy the terrain, units, projectiles, etc. O_O (with chat commands)
http://www.youtube.com/watch?v=p6qOxAWcYb8
// the gray grid is -bx mode terrain and is activated localy
to alter gfx type -bx 1 (or -r_lowres 1)
to alter creeps -r_creeps 1 (or 2 i don't remember)
and it works very well for multiplayer.
09-17-2010, 12:00 AM#9
Ignitedstar
I don't understand. Why do you want to use something like this in the first place? Sounds like something people have been using, but I really don't get it.