Massive Creep amounts with respawn problem

Ice Bane

Member
Reaction score
5
Hello there everyone, I've been working on a map for some time now and it's like, go out and farm yourself up to level 10, survive for 5 mins > win. If another player kills you, you lose one level. (Just some off-topic info)

In which case, I need a lot of creeps out on the battlefield, similiar to World of Warcrafts (and tons of other MMO:s) creep system.


I made a system based on regions where a trigger that every 20-35(or any other number) checks whether there is equal to 0 units owned by neutral hostile in the region, if there isn't any it will spawn one of levels ranging from 1-6, where these creep-types are setup with variables (with arrays), since I don't want ALL of the original creeps.

Code:
Event - Every (Random Integer between 20 - 35 seconds

Condition - (""Counts units in region owned by Neutral Hostile")

Action - Unit - Create 1 Level_1_to_6[Random NR between 1 and 5]


----------------------

I had about 80-100 of these triggers and when they started, they caused a desync, also known as server split. Which tend to appear if to much data is handled at the same time, and when it happens players are setup on diffrent servers not syncing and in doing so the players actions can't be seen by those who're on the opposite server.

I know this is the source of the desync since I removed all the spawn triggers and after that it was fixed.


------------------------

So here's my problem, is there any possible way to create a Creep system with about 80-100 instances running at the same time?

Either if you come up with a solution to the server split/desync problem OR if you come up with a new system.

Any feedback is very much appreciated!




-----------------------

Questionmarks


Can you prevent desyncs/server splits? (If you can, what will do the trick?


Could putting all these triggers together into a smaller amount of triggers with a quicker timer and a randomizer for the regions solve it?



Like:
Code:
[B][U]Event [/U][/B] - Time - Every (Random nr between 8 - 12) seconds

[B][U]Cond[/U][/B] - none

[B][U]Actions[/U][/B] - 

[B][I]If/Then/Else[/I][/B]

- [B]If[/B]  - Integer - (Nr of Units in (Region[Random Nr between 1-10)) equal to 0

- [B]Then[/B] - Create 1 Level_1_to_6[Random NR between 1 and 5]

- [B]Else[/B] - Do nothing
 

Komaqtion

You can change this now in User CP.
Reaction score
469
First off, this is the Tutorials and Resources subforum, which is not the place for a question like this to be posted, so you should've posted it in the World Editor Help section :p

But now, for you problem... Why not just use an integer loop? I mean since you've already set the regions up in an array, then just use something like this:
Trigger:
  • Random Creeps Respawn
    • Events
      • Time - Every (Random real number between 8.00 and 12.00) seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set TempGroup = (Units in Region[(Integer A)])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in TempGroup) Equal to 0
            • Then - Actions
              • Set TempPoint = (Random point in Region[(Integer A)])
              • Unit - Create 1 Level_1_to_6[Random NR between 1 and 5] for Neutral Hostile at TempPoint facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_TempPoint)
            • Else - Actions
          • Custom script: call DestroyGroup(udg_TempGroup)


Btw, why not just use one of the simply respawn systems we have heve already at thehelper.net... Like after X seconds when a unit owned by neutral hostile dies, it'll respawn ?

http://www.thehelper.net/forums/showthread.php?t=55581

Here you can find some things that'll cause desyncs:
http://www.thehelper.net/forums/showthread.php?t=89207
 

TheCrystal

New Member
Reaction score
36
By the way, I've been wondering this for awhile, does "clear group" keep the handles on units? Or would it always be best to use your method of DestroyGroup? Something I missed on my education ^_^
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Nope, Clear Group saves nothing but the group...
And it's best to destroy the group after use, always...

Though, in JASS, you should use one single global group, when using GroupEnumUnits...
As it takes less processor load to do that, than to create a new group all the time...
 

TheCrystal

New Member
Reaction score
36
The whole point I'm wondering is because the handles are destroyed on unit death, but I guess it'd be fine to remove the handles in these types of situations, like shit for an ability it seems useless unless you can type the code faster then use the GUI action.
 

Ice Bane

Member
Reaction score
5
First off, this is the Tutorials and Resources subforum, which is not the place for a question like this to be posted, so you should've posted it in the World Editor Help section :p

-------------------
ANSWER:

Oh, I have? XD Silly me, wasn't my intention, so IF ANY MODERATOR SEES THIS, JUST MOVE IT TO THE WORLD EDITOR HELP SECTION PLEASE. =)


--------------------


Btw, why not just use one of the simply respawn systems we have heve already at thehelper.net... Like after X seconds when a unit owned by neutral hostile dies, it'll respawn ?


http://www.thehelper.net/forums/showthread.php?t=55581

--------------------
ANSWER:

I know I could use it, but I anyhow need the map to create about 120-150 units in start randomly, I don't want people to notice that every time a creep starts on one place and another on the same place every time.

If you get my point?

Else I belive it's a good system, which I'll probably use :)

--------------------

I think I'll do it like this, I make a few triggers with integer loops for groups I've divided the regions in. (Like, Lv_1_to_6 e t c)
This however will not be a repeating timer but a "Eplapsed gametime"-trigger.

Then I'll use the "Whenever a unit dies" system and just edit it a bit.

Thanks a lot for your reply, realy helps me a lot!

Best Wishes! - Ice bane
+ rep
 

Ice Bane

Member
Reaction score
5
Just found out what it was; seemingly the World Editor doesn't like when you use the condition "Count number of units in region" to many times.

That made wc3 cause to serversplit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top