• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Does this will sync?

Status
Not open for further replies.
Level 12
Joined
Oct 16, 2010
Messages
680
No, cuz you locally hide it. So only local player won't see the unit

Do this:
  • Blahblah
    • Events
    • Conditions
    • Actions
      • Unit - Hide Unit
      • Destructible - Hide Des
      • Custom script: if GetLocalPlayer() == udg_Player then
      • Unit - Unhide Unit
      • Destructible - Unhide Des
      • Custom script: endif
 
whops, I think that I was wrong about this.



It seems then the code will desync:S

Nestharus' statement refers to the handle stack. Most agents are placed on the same handle stack, starting from 0x100000 and increasing from then on. However, there are a few handle types (texttags, ubersplats, etc.) that have a separate stack (0 to 99) which can be created locally.

However, this only is an issue when you are creating or destroying something within a local handle block. In the case of the OP, he is just hiding it. It won't immediately desync, but you are correct on this statement:
but as soon as the unit locally hided interracts with anything, I think it cause desync

The interaction can cause a desync. :( Most widgets behave this way if I'm not mistaken. Usually destructables are fine because we don't do anything with them anyway, but units can be problematic because in most cases we want to do something with them.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
The code will desync, but it wont if the unit has "Locust" and the destructible cannot be destroyed or interacted with
 
Look.

It will not desync UNLESS:

- You actually have checks that do a certain set of actions that modify the handle table depending on whether a unit is hidden or not.
- Another player interacts with the destructable/unit that's hidden for another player.

Anything that can get code to run on one player's computer and not the other can end up desyncing the game if the handle table, or even the STRING table is modified.
 
Status
Not open for further replies.
Top