• 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] Something is causing all players to drop in my map

Status
Not open for further replies.
Level 5
Joined
Sep 19, 2007
Messages
97
Hi, in the new version of my map, something is causing people to get disconnected.

hoihoi8's Amazing Race 1.0 - The Hive Workshop - A Warcraft III Modding Site

I was playing 1v1 and it was Druid of the Claw vs Trapper and it disconnected my opponent. Still trying to figure out what is causing the drops.

1. When writing triggers, what can cause the game to drop all players?
2. I need testers who can figure out what is causing the problem, or an expert who can look over my map and find the error.
 
Level 5
Joined
Sep 19, 2007
Messages
97
I got some ideas out of that thread.

I'll remove all my loops using integer A and replace them with variables.

What about not using "Wait" in loops. Is that proven true, or just a guess by someone?
 
Level 5
Joined
Jan 25, 2006
Messages
103
I got some ideas out of that thread.

I'll remove all my loops using integer A and replace them with variables.

What about not using "Wait" in loops. Is that proven true, or just a guess by someone?
wait it loops should not cause disconnections by itself. Though if you use significant amount of them in various loops in may end up breaking some triggers and thus random disc, but i highly doubt it.

What you need to do first though is discover if the disconnections are due to bad connection, game crash of the other player, maybe he just quit, or if they are really due to your triggers?

First make a trigger:
player 2 blue leaves
action - game-display floating text to all players player 2 blue is a quitter!

and same all players able to play your map.

now protect the map if you are affraid some1 might steal it from you and put a "alpha" or "beta" tag on it and go test it online.
asking in this forum for people to test your game is going to prove hard, since i'm sure everyone is busy and it will be hard to arrange a test.

if you confirm the triggers are indeed responsible for the disc. then you might ask for some1 to look at your map.
 
Level 6
Joined
Mar 20, 2008
Messages
208
The link to your map is to a protected version......we can't help you unless we see the code or atleast even snippets of it.

Deon I can't even find your map to look at it.

Well, atleast we made progress from not posting a map, to posting a protected version of a map. :cool:
 
Level 5
Joined
Sep 19, 2007
Messages
97
The link to your map is to a protected version......we can't help you unless we see the code or atleast even snippets of it.

Deon I can't even find your map to look at it.

Well, atleast we made progress from not posting a map, to posting a protected version of a map. :cool:

I have attached my triggers and object data.

Edit: perhaps this trigger is causing an issue?
  • Do follow cam
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RaceStarted Equal to True
              • FollowCam[(Player number of (Picked player))] Equal to True
            • Then - Actions
              • Camera - Pan camera for (Picked player) to (Position of HeroID[(Player number of (Picked player))]) over 0.05 seconds
            • Else - Actions
 

Attachments

  • AR_1_0.zip
    34.3 KB · Views: 81
Last edited:
Level 5
Joined
Jan 25, 2006
Messages
103
wth? triggers cause editor to crash.
post your full map.
by the look of it though, i'd say you are using way too much triggers, i'm sure you can do half the stuff with just normal editing and adding regions.
and why are you setting variables at map initialization, those should be set in their own specific triggers.
anyways most of the triggers cause editor to crash, so it must be triggers related to terrain and i'm 99% sure one of them is the cause of the disc. problem!
 
Level 5
Joined
Sep 19, 2007
Messages
97
wth? triggers cause editor to crash.
post your full map.
by the look of it though, i'd say you are using way too much triggers, i'm sure you can do half the stuff with just normal editing and adding regions.
and why are you setting variables at map initialization, those should be set in their own specific triggers.
anyways most of the triggers cause editor to crash, so it must be triggers related to terrain and i'm 99% sure one of them is the cause of the disc. problem!

That's probably because you don't have Jassnewgenpack5b world editor. Not having it will disable a bunch of triggers.

Several spells I added to the map from the HiveWorkShop required Jass helpers.
 
Level 6
Joined
Mar 20, 2008
Messages
208
I have attached my triggers and object data.

Edit: perhaps this trigger is causing an issue?
  • Do follow cam
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RaceStarted Equal to True
              • FollowCam[(Player number of (Picked player))] Equal to True
            • Then - Actions
              • Camera - Pan camera for (Picked player) to (Position of HeroID[(Player number of (Picked player))]) over 0.05 seconds
            • Else - Actions

Every .04 seconds? are you nuts?

Divide 1 by .04. Its 25. You are running this code 25 times a second. Further, you are running it for every player, so thats #P X 25. 5 players would make this code run 125 times a second.

Given theres no wait code for it to catch a break, thats one straight block of code.

I suggest you do .1 or .15
thats 10 times a second, and 6ish times a second.

Aso, I suggest you try locking the camera to the unit instead of moving it every second. That should make it all clientside.
 
That code leaks sure, but otherwise it's fine. I see no reason why executing that code 125 times per second should lag? In fact, executing that code 2000 times per second won't cause lag. But yeah, you need to fix that leak in that trigger - store the position of the hero in a variable then remove it after you've moved the camera. Oh yeah, and an optimization point - that "RaceStarted Equal to True" should be in the trigger conditions.
 
Level 5
Joined
Sep 19, 2007
Messages
97
Every .04 seconds? are you nuts?

Divide 1 by .04. Its 25. You are running this code 25 times a second. Further, you are running it for every player, so thats #P X 25. 5 players would make this code run 125 times a second.

Given theres no wait code for it to catch a break, thats one straight block of code.

I suggest you do .1 or .15
thats 10 times a second, and 6ish times a second.

Aso, I suggest you try locking the camera to the unit instead of moving it every second. That should make it all clientside.

Locking the camera is out of the question. You can't use the mini-map for navigation. I changed it to .5 seconds. I'll remove the leak.
 
Level 6
Joined
Mar 20, 2008
Messages
208
That code leaks sure, but otherwise it's fine. I see no reason why executing that code 125 times per second should lag? In fact, executing that code 2000 times per second won't cause lag. But yeah, you need to fix that leak in that trigger - store the position of the hero in a variable then remove it after you've moved the camera. Oh yeah, and an optimization point - that "RaceStarted Equal to True" should be in the trigger conditions.

Take into account all of the other things that need to run.
 
Take into account all of the other things that need to run.
That trigger, as I already said, could be running 2000 times per second. I think that's enough said.

Why need to pan camera every 0.04 secs? Why not just lock camera to unit? o_O
Or am i giving a Really stupid answer now?
As he already said, if you lock the camera to the unit, you can't right-click on the minimap to give your unit an order.
 
Level 5
Joined
Sep 19, 2007
Messages
97
I think I might have found a major problem. Do Jass arrays use the 0 index?

  • AP Entangle
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Ancient Protector
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Attacked unit)) Not equal to Trapper
        • Then - Actions
          • Set firstplaceunit = 0
          • For each (Integer IndexApEntangle) from 1 to 12, do (Actions)
            • Loop - Actions
              • If (PlayerScore[IndexApEntangle] Greater than PlayerScore[firstplaceunit]) then do (Set firstplaceunit = IndexApEntangle) else do (Do nothing)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • firstplaceunit Greater than 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Attacked unit)) Equal to (Owner of HeroID[firstplaceunit])
                • Then - Actions
                  • Set DummyPoint_AP[entangleIndex] = (Position of (Attacked unit))
                  • Unit - Create 1 dummyunit_AP for (Owner of (Attacking unit)) at (Position of (Attacked unit)) facing Default building facing degrees
                  • Set DummyUnit_AP[entangleIndex] = (Last created unit)
                  • Unit - Order DummyUnit_AP[entangleIndex] to Night Elf Keeper Of The Grove - Entangling Roots (Triggering unit)
                  • Custom script: call RemoveLocation( udg_DummyPoint_AP[udg_entangleIndex] )
                  • Wait 3.00 game-time seconds
                  • Unit - Remove DummyUnit_AP[entangleIndex] from the game
                  • Set DummyUnit_AP[entangleIndex] = No unit
                  • Set entangleIndex = (entangleIndex + 1)
                  • If (entangleIndex Greater than 25) then do (Set entangleIndex = 0) else do (Do nothing)
                • Else - Actions
            • Else - Actions
        • Else - Actions
 
Level 5
Joined
Sep 19, 2007
Messages
97

Attachments

  • alldropped.w3g
    42.8 KB · Views: 52
Last edited:
Status
Not open for further replies.
Top