• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Desync - Drops player

Status
Not open for further replies.
  • Death of a hero cam
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Trigger - Turn off Third Person Camera <gen>
      • Trigger - Turn off Reset Selection <gen>
      • Trigger - Turn off Reset Button <gen>
      • Unit - Remove Trigger Hero Stat Bonus (+8 All Stats) from Hero[1]
      • Unit - Set Hero[1] movement speed to (Default movement speed of Hero[1])
      • Animation - Change Hero[1]'s animation speed to 100.00% of its original speed
      • Special Effect - Destroy Fx[1]
      • Special Effect - Destroy Fx[2]
      • Animation - Play Resurrection Stone 0083 <gen>'s stand work animation
      • Wait 4.00 seconds
      • Camera - Pan camera as necessary for Player 1 (Red) to (Player 4 (Purple) start location) over 0.00 seconds
      • Animation - Play Resurrection Stone 0083 <gen>'s stand animation
      • Wait 2.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Player 4 (Purple) start location), Show revival graphics
      • Camera - Reset camera for Player 1 (Red) to standard game-view over 1.00 seconds
      • Camera - Change camera smoothing factor to 100.00
      • Wait 0.80 seconds
      • Trigger - Turn on Returns to Cam System <gen>
It drops the non-host player when the hero dies. This must be the culprit. But I want to confirm this before I go make a dummy unit timer. So my question is.... Is it possible that this is not the problem. If someone says no ... waits are bad but they shouldn't drop a player the way you use them here. That would save me time and help me find the real problem.

My apologies for asking but its hard to find someone to test it, otherwise I would remove the waits and see it that works.

Also, if it is the waits, I am curious what people recommend. I like the dummy timer unit idea.

Map development and pastebin link here.
 
this leaks. (Player 4 (Purple) start location)

also it could be the special effects as i cant see them being created. if u destroy an already destroyed / null handle it can cause desyncs.

u can try deleting each action to see if the desyncs keep happening. that way u can find the true culprit

Thanks, this is great advice! The problem is that it is very difficult to find people and time to 2 player test. If I could test it myself that would be easy.

I think rather than removing one at a time (which I agree would be best), I will fix the leaks and add an if/then so the FXs are only destroyed if they have been created.

Are you thinking that the problem is not the wait?

  • Camera - Pan camera as necessary for Player 1 (Red) to (Player 4 (Purple) start location) over 0.00 seconds
This function causes desync. just as WaterKnight said.

Can I use just plain old pan camera? Is that safe?

  • Death of a hero cam
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Trigger - Turn off Third Person Camera <gen>
      • Trigger - Turn off Reset Selection <gen>
      • Trigger - Turn off Reset Button <gen>
      • Unit - Remove Trigger Hero Stat Bonus (+8 All Stats) from Hero[1]
      • Unit - Set Hero[1] movement speed to (Default movement speed of Hero[1])
      • Animation - Change Hero[1]'s animation speed to 100.00% of its original speed
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroFX[1] Equal to 1
        • Then - Actions
          • Special Effect - Destroy Fx[1]
          • Special Effect - Destroy Fx[2]
        • Else - Actions
      • Animation - Play Resurrection Stone 0083 <gen>'s stand work animation
      • Wait 4.00 seconds
      • Set TempSL[1] = (Player 4 (Purple) start location)
      • Camera - Pan camera for Player 1 (Red) to TempSL[1] over 0.00 seconds
      • Custom script: call RemoveLocation ( udg_TempSL[1] )
      • Wait 2.00 seconds
      • Set TempSL[1] = (Player 4 (Purple) start location)
      • Hero - Instantly revive (Triggering unit) at TempSL[1], Show revival graphics
      • Custom script: call RemoveLocation ( udg_TempSL[1] )
      • Camera - Reset camera for Player 1 (Red) to standard game-view over 1.00 seconds
      • Camera - Change camera smoothing factor to 100.00
      • Wait 0.80 seconds
      • Animation - Play Resurrection Stone 0083 <gen>'s stand animation
      • Trigger - Turn on Returns to Cam System <gen>
Also, it has been suggested that I use JNGP 2.0 to run a 2nd player emulator to test this desync issue. I am skeptical that this will work because both players (me and the emulator) will be playing through the same host. My understanding is that desync occurs as a result of the game running the same functions at different times for the separate players being at different IPs with different RAM capacities. Using the emulator will not recreate the environment needed to produce the desync. Please, if anyone knows differently, correct me. I would love to be wrong, it would make testing so much easier.
 
Last edited:
Also, it has been suggested that I use JNGP 2.0 to run a 2nd player emulator to test this desync issue. I am skeptical that this will work because both players (me and the emulator) will be playing through the same host. My understanding is that desync occurs as a result of the game running the same functions at different times for the separate players being at different IPs with different RAM capacities. Using the emulator will not recreate the environment needed to produce the desync. Please, if anyone knows differently, correct me. I would love to be wrong, it would make testing so much easier.

It works just fine. You are still running it on LAN, which is a network, therefore there is still the exchange of data between each game instance. Because of this, it is still possible to desync.

For example, if you run this:
JASS:
if GetLocalPlayer() == Player(0) then
    call CreateGroup()
endif
The players other than player 1 will be disconnected, even in the multiplayer emulator. I've tested it (or something similar). If you are doubtful, you can feel free to test it but I can assure you that it should behave just as if you were playing a regular LAN game.
 
I am convinced. I will test my updated tigger. If it fails, I will disable 1 action at a time until I discover the offender. Thank you all. I will post my results for the benefit of anyone who has this question in the future. Or, If I'm still stuck, I might have more questions. :)

edit:

ok back. Does anyone no how to fix this? I have used NewGen WE but this is the first time I try running NewGenTFT.

Error message:

- Could not hack game.dll . please post logs/ongameload.txt -

ongameload.txt this :

loading kernel32.dll
loading blizzard.ax
loading Game.dll
Game.dll loaded...pausing and running script
Error: RegisterNatives signature not found


Google has led me only to more posts ending like this.
 
Last edited:
Don't run NewGen Warcraft III. It is intended for an older patch (1.21b), usually when you are testing something with japi custom natives.

You should be able to run whatever you need to with the normal Warcraft III.exe. The multiplayer simulation is only integrated in JNGP 2.0 though. To implement it without JNGP 2.0, you would need to check out:
http://www.hiveworkshop.com/forums/...multiple-warcraft-3-running-single-pc-226287/
 
Status
Not open for further replies.
Top