• 🏆 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!

could someone help me with this map

Status
Not open for further replies.
Level 21
Joined
Mar 2, 2010
Messages
3,069
i dont know what is causing it myself. each time it happens it have a different cause as well so it is difficult to figure out. what happens however is that a pc connected to the game gets a crash of the game.(memory related error message) i will provide more information if i find any but that is all i have for now. please help me out.
 
Level 7
Joined
Jan 22, 2013
Messages
293
Found it:

  • Autocast
    • Events
      • Time - Every 0.08 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Obelisk))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Equal to 10.00
            • Then - Actions
              • Wait 60.00 seconds
              • Unit - Order (Picked unit) to Undead Obsidian Statue - Activate Spirit Touch
              • Unit - Order (Picked unit) to Undead Obsidian Statue - Spirit Touch
            • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_Group)
Hes destroying a group that is (Playable map area)


Also:


  • Actions
    • Set Arrayer = 0
    • For each (Integer Debug) from 1 to 6, do (Actions)
      • Loop - Actions
        • Set Arrayer = (Arrayer + 1)
        • Set Temp_Player_Group = (All players)
        • Player Group - Remove (Player(6)) from Temp_Player_Group
        • Player Group - Remove (Player(Arrayer)) from Temp_Player_Group
        • Set Temp_Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) Not equal to (Player(Arrayer))) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Not equal to Player 6 (O
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in Temp_Group) Equal to 0
          • Then - Actions
            • Game - Victory (Player(Arrayer)) (Show dialogs, Show scores)
            • Game - Victory (Player(6)) (Show dialogs, Show scores)
            • Player Group - Pick every player in Temp_Player_Group and do (Actions)
              • Loop - Actions
                • Game - Defeat (Picked player) with the message: Defeat!
          • Else - Actions
        • Custom script: call DestroyGroup (udg_Temp_Group)
Hes Destroying another one with the same issue.



I Also started counting the amount of leaks in the map and the total sums up to:

187 with some being used way more then a hundred times a game.

Your map is by no means a easy fix leak wise but the desyc issue and game crash can be fixed no problem if my efforts are correct. You need to make sure your not using (entire map) or (playable map area) in any type of group you are destroying later. you should have a region pre-set or w/e on the entire map if your going to do that the same way.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
i dont believe so but you are welcome to check the map to make sure. (the best way to find issues is to open the map after all.) it was a user on another forum that came up with the destroy group script. if you know of a better solution please add it to the map for me.
 
Level 7
Joined
Jan 22, 2013
Messages
293
i dont believe so but you are welcome to check the map to make sure. (the best way to find issues is to open the map after all.)

I did what you just said above your post.


EDIT:
Here you may learn how to fix your leaks: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

Also what they don't always tell you is to null all custom script leak removals.

Example:

  • Custom script: call RemoveLocation(udg_LocationOfCaster)
  • Custom script: set udg_LocationOfCaster = null
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Found it:


  • Autocast
    • Events
      • Time - Every 0.08 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Obelisk))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Equal to 10.00
            • Then - Actions
              • Wait 60.00 seconds
              • Unit - Order (Picked unit) to Undead Obsidian Statue - Activate Spirit Touch
              • Unit - Order (Picked unit) to Undead Obsidian Statue - Spirit Touch
            • Else - Actions
      • Custom script: call DestroyGroup (udg_Temp_Group)

Hes destroying a group that is (Playable map area)

That is not the issue :)

You can safely destroy a group, he is not destroying Playable map area.

Waits should not be used in unit group picks they do not work properly.
 
Level 7
Joined
Jan 22, 2013
Messages
293
That is not the issue :)

You can safely destroy a group, he is not destroying Playable map area.

Waits should not be used in unit group picks they do not work properly.

Whaaaatt. I thought that issue was only with custom script ITE (If then Else)
 
Level 4
Joined
Jan 27, 2010
Messages
133
In the trigger posted by Orthane you have waits in Unit Group - loops. That doesn't even remotely work. Try to remove those and see if things get better.
 
If you want to find the reason for your desync, follow the instructions below:

1) deactivate all triggers in your map
--> if the desync persists, it's something in the object data or a corrupt tile (no joking, this is possible! I once had a desyncing issue when people stepped on a certain tile and fixed it by removing the tile from the tileset and adding it again)
--> if the desync is gone, reactivate all your triggers and disable entire blocks of triggers, narrowing it down to a group of triggers to check

2) repeat this process until you found a couple of triggers that cause the desync

3) post the suspect triggers for us to fix them

Please don't expect us to do the dirty work for you. We will tell you what the problem is once you narrowed it down. Because we would do the same in order to find the culprit.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
it isnt a desync but a crash. i tested the map again myself with all triggers active but it didnt crash for me.(someone needs to look at the triggers for me. someone with knowledge of what can cause a crash.) i did however encounter another issue that i might need help with. players can take control of other player`s blood forges by moving units within range but that doesnt always work, please help me out.
 
Level 4
Joined
Jan 27, 2010
Messages
133
I've had nothing but nightmares when using replace/remove unit. (Replace actually performs remove). I personally prefer hide+kill.

players can take control of other player`s blood forges by moving units within range but that doesnt always work, please help me out.

Your script only checks for original owner. If player 1 has left, then player 2 can take it. But since player 1 has left, player 3 can take it from player 2. You should use:

  • Conditions
    • Or
      • Owner of (Bloof forge 0012<gen>) is unused
      • Owner of (Bloof forge 0012<gen>) has left the game
 
Level 7
Joined
Jan 22, 2013
Messages
293
He has more then just a few loops like that, you should seriously open his map and look at it. Make the time.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
here is a new version where i have cleared up some unused triggers. another issue i found is that the text that shows up when a unit or building have been destroyed shows to all players instead of those involved. please help me fix the text so that any of the text that starts with your, only shows to the controlling player. as for the other bugs, i dont know a lot about loops so really cant identify those triggers that are or how to fix them. please help me out.
 

Attachments

  • bam web mountains4.w3x
    1 MB · Views: 38
You may seriously want to consider going to the tutorial section to learn how to optimize your GUI code and alot.
I believe they are helpful although I have actually never been through one myself. Other than if the ones that contain the Jass script to clean codes as one.

The way you coded it could the the cause as there is a lot of instance-able action going on that some of the other players computers can't handle.
 
I am still not entirely certain about what is wrong, although I don't have the time to go through all of you triggers. I would suggest though to keep all the spell cast triggers disabled until a unit of the right type can use it.

I would also never suggest using the one line if then else function.
  • If (True Equal to True) then do (Do nothing) else do (Do nothing)
Instead use the multi possible action one.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • Then - Actions
    • Else - Actions
One more thing that I picked up while going though your triggers where that you used "GetEnteringUnit" instead of "GetTriggeringUnit" some of the time. Not sure what else to tell in the time I would like to take.

...
The way you coded it could the the cause as there is a lot of instance-able action going on that some of the other players computers can't handle.
This will still be my best guess for the problem. Although I am not certain. Did the whole entire game close down for them, or did it just kick the player strait back to the "Local Area Network" area?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
These leak:

  • (Number of units in (Units in Foundation1 <gen> matching ((Unit-type of (Matching unit))...
  • Unit Group - Pick every unit in (Units in Foundation1 <gen>) and do (Unit - Remove (Picked unit) from the game)
Use this line before those unit group picks.
  • Custom script : set bj_wantDestroyGroup = true

And this leaks:
  • Item - Create (Random level 8 item-type) at (Position of (Triggering unit))
->
  • Set pointVariable = (Position of (Triggering unit))
  • Item - Create (Random level 8 item-type) at pointVariable
  • Custom script : call RemoveLocation(udg_pointVariable)
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
the crash seem to be fixed but other problems remain. text shows to the wrong players, transfer activates too soon and basal golems dont transform into obelisks when they stop moving. armor doesnt work as intended either.(intedended armor is attack minus defense = damage.) please help me with those as well.
 
Level 7
Joined
Jan 22, 2013
Messages
293
I got tired of looking at a wall of triggers so I figured I'd help you and some others out that are trying to look for problems by improving what you already have there.


This is a new Trigger for you to add And the variables in it.
  • Int
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ====================================== --------
      • -------- --------
      • -------- Fountains are set for an integer to Massivly shorten (Trigger: Next to Blood Forge) --------
      • -------- --------
      • -------- ====================================== --------
      • Set New_FountainOwners[1] = Blood Forge players 0019 <gen>
      • Set New_FountainOwners[2] = Blood Forge players 0024 <gen>
      • Set New_FountainOwners[3] = Blood Forge players 0008 <gen>
      • Set New_FountainOwners[4] = Blood Forge players 0013 <gen>
      • Set New_FountainOwners[5] = Blood Forge players 0012 <gen>
      • Set New_FountainOwners[6] = Super Blood Forge game master 0058 <gen>
      • Set New_FountainOwners[7] = Blood Forge players 0009 <gen>
      • Set New_FountainOwners[8] = Blood Forge players 0018 <gen>
      • -------- You are a pain for using player ten and not 9. Seriously? --------
      • Set New_FountainOwners[10] = Blood Forge players 0020 <gen>
      • -------- ====================================== --------
      • -------- --------
      • -------- Fountains regions are set for an integer to Massivly shorten (Trigger: Next to Blood Forge) --------
      • -------- --------
      • -------- ====================================== --------
      • Set New_Fountain_Rect[1] = red player blood forge <gen>
      • Set New_Fountain_Rect[2] = blue player blood forge <gen>
      • Set New_Fountain_Rect[3] = teal bloodforge <gen>
      • Set New_Fountain_Rect[4] = purple player blood forge <gen>
      • Set New_Fountain_Rect[5] = yellow player blood forge <gen>
      • Set New_Fountain_Rect[6] = game master blood forge <gen>
      • Set New_Fountain_Rect[7] = green bloodforge <gen>
      • Set New_Fountain_Rect[8] = pink bloodforge <gen>
      • -------- *Raises fist in anger* --------
      • Set New_Fountain_Rect[10] = light blue bloodforge <gen>
      • -------- ====================================== --------
      • -------- --------
      • -------- These are here because you remove so many abilities. --------
      • -------- & --------
      • -------- These are to run conditions to only run the ones the unit has that you are trying to remove --------
      • -------- --------
      • -------- ====================================== --------
      • -------- You are Missing: Wraith Form --------
      • -------- You are Missing: Wraith New Form --------
      • -------- You are Missing: Wizard Form --------
      • -------- You are Missing: Druid Form --------
      • -------- You are Missing: Gargoyle Form --------
      • -------- You are Missing: Gargoyle New Form --------
      • -------- You are Missing: Ghoul New Form --------
      • -------- You are Missing: Gnome New Form --------
      • -------- You are Missing: Griffin New Form --------
      • -------- You are Missing: Paladin New Form --------
      • -------- You are Missing: Ranger Form --------
      • Set New_Transformation_Abilities[1] = transform into zombie new org
      • Set New_Transformation_Abilities[2] = transform into wyrm new
      • Set New_Transformation_Abilities[3] = transform into wraith new 2
      • Set New_Transformation_Abilities[4] = transform into wizard new
      • Set New_Transformation_Abilities[5] = transform into warrior new
      • Set New_Transformation_Abilities[6] = transform into stone golem new
      • Set New_Transformation_Abilities[7] = transform into stone golem
      • Set New_Transformation_Abilities[8] = transform into ranger new 2
      • Set New_Transformation_Abilities[9] = transform into paladin destroyer form
      • Set New_Transformation_Abilities[10] = transform into nymph
      • Set New_Transformation_Abilities[11] = transform into griffin new 2
      • Set New_Transformation_Abilities[12] = transform into gnome new two
      • Set New_Transformation_Abilities[13] = transform into ghoul new 2
      • Set New_Transformation_Abilities[14] = transform into gargoyle new 2
      • Set New_Transformation_Abilities[15] = transform into fury new
      • Set New_Transformation_Abilities[16] = transform into druid new
      • Set New_Transformation_Abilities[17] = transform into cleric new
      • -------- ====================================== --------
      • -------- --------
      • -------- Abiltities pre-set like this allows me to shorten blinding walls of triggers --------
      • -------- --------
      • -------- ====================================== --------


Improved triggers:

  • Leaves Mystical Site
    • Events
      • Unit - A unit leaves site 1 <gen>
      • Unit - A unit leaves site 3 <gen>
      • Unit - A unit leaves site 2 <gen>
      • Unit - A unit leaves site 5 <gen>
      • Unit - A unit leaves site 4 <gen>
      • Unit - A unit leaves site 6 <gen>
      • Unit - A unit leaves site 7 <gen>
      • Unit - A unit leaves site 8 <gen>
      • Unit - A unit leaves site 9 <gen>
      • Unit - A unit leaves site 10 <gen>
      • Unit - A unit leaves site 11 <gen>
      • Unit - A unit leaves site 12 <gen>
      • Unit - A unit leaves site 13 <gen>
      • Unit - A unit leaves site 14 <gen>
      • Unit - A unit leaves site 15 <gen>
      • Unit - A unit leaves site 16 <gen>
      • Unit - A unit leaves site 17 <gen>
      • Unit - A unit leaves site 18 <gen>
      • Unit - A unit leaves site 19 <gen>
      • Unit - A unit leaves site 20 <gen>
      • Unit - A unit leaves site 21 <gen>
      • Unit - A unit leaves site 22 <gen>
      • Unit - A unit leaves site 23 <gen>
      • Unit - A unit leaves site 24 <gen>
      • Unit - A unit leaves site 25 <gen>
    • Conditions
    • Actions
      • -------- This is all new, so you can see just how much is being improved. --------
      • Set New_TempUnit1 = (Triggering unit)
      • For each (Integer New_LoopC) from 1 to 17, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of New_Transformation_Abilities[New_LoopC] for New_TempUnit1) Greater than or equal to 1
            • Then - Actions
              • Unit - Remove New_Transformation_Abilities[New_LoopC] from New_TempUnit1
            • Else - Actions
      • Custom script: set udg_New_TempUnit1 = null
  • Unit Comes Near Blood Forge
    • Events
      • Unit - A unit comes within 200.00 of Blood Forge players 0019 <gen>
      • Unit - A unit comes within 200.00 of Blood Forge players 0012 <gen>
      • Unit - A unit comes within 200.00 of Blood Forge players 0013 <gen>
      • Unit - A unit comes within 200.00 of Blood Forge players 0024 <gen>
      • Unit - A unit comes within 200.00 of Super Blood Forge game master 0058 <gen>
      • Unit - A unit comes within 200.00 of Blood Forge players 0008 <gen>
      • Unit - A unit comes within 200.00 of Blood Forge players 0009 <gen>
      • Unit - A unit comes within 200.00 of Blood Forge players 0020 <gen>
    • Conditions
    • Actions
      • -------- This Replaces all of the Turned off Triggers Below --------
      • Set New_TempUnit2 = (Triggering unit)
      • For each (Integer New_LoopA) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • New_LoopA Not equal to 9
              • (Unit-type of New_TempUnit2) Not equal to Basal Golem created from blood forge
              • (Owner of New_FountainOwners[New_LoopA]) Equal to (Owner of New_TempUnit2)
              • (New_Fountain_Rect[New_LoopA] contains New_TempUnit2) Equal to True
            • Then - Actions
              • Unit - Add transform into basal golem new to New_TempUnit2
            • Else - Actions
      • Custom script: set udg_New_TempUnit2 = null
  • Unit Leaves Blood Forge
    • Events
      • Unit - A unit leaves red player blood forge <gen>
      • Unit - A unit leaves blue player blood forge <gen>
      • Unit - A unit leaves purple player blood forge <gen>
      • Unit - A unit leaves yellow player blood forge <gen>
      • Unit - A unit leaves game master blood forge <gen>
      • Unit - A unit leaves teal bloodforge <gen>
      • Unit - A unit leaves green bloodforge <gen>
      • Unit - A unit leaves pink bloodforge <gen>
      • Unit - A unit leaves light blue bloodforge <gen>
    • Conditions
    • Actions
      • Set New_TempUnit3 = (Triggering unit)
      • For each (Integer New_LoopB) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • New_LoopB Not equal to 9
              • (Unit-type of New_TempUnit3) Not equal to Basal Golem created from blood forge
              • (Owner of New_FountainOwners[New_LoopB]) Equal to (Owner of New_TempUnit3)
            • Then - Actions
              • Unit - Remove transform into basal golem new from New_TempUnit3
            • Else - Actions
      • Custom script: set udg_New_TempUnit3 = null
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
for this one Improved Unit Comes in range of Blood Pool
first dont use entering unit instead use triggering unit.
next u should store unit type of triggering unit into an integer variable and compare it to that.
same with owner of triggering unit. store that into a variable.
u could also store triggering unit into a variable.

for ur conditions u can use one big conditions block rather than making many ITEs.
just use it like this.
  • Or - Any (Conditions) are true
    • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
if u dont decide to do this then remove all of the ands in the conditions u dont need these.

umm i hope ull see the thing u did wrong here.
  • For each (Integer New_LoopB) from 1 to 10, do (Actions)
  • Loop - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • New_LoopB Not equal to 9
  • (Unit-type of (Triggering unit)) Not equal to Basal Golem created from blood forge
  • (Owner of New_FountainOwners[New_LoopA]) Equal to (Owner of (Triggering unit))
if u didnt look at the integers u use.
also u use triggering unit 3 times so u should store it into a variable and use that.
 
Level 7
Joined
Jan 22, 2013
Messages
293
for this one Improved Unit Comes in range of Blood Pool
first dont use entering unit instead use triggering unit.
next u should store unit type of triggering unit into an integer variable and compare it to that.
same with owner of triggering unit. store that into a variable.
u could also store triggering unit into a variable.

for ur conditions u can use one big conditions block rather than making many ITEs.
just use it like this.
  • Or - Any (Conditions) are true
    • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
      • And - All (Conditions) are true
        • Conditions
if u dont decide to do this then remove all of the ands in the conditions u dont need these.

umm i hope ull see the thing u did wrong here.
  • For each (Integer New_LoopB) from 1 to 10, do (Actions)
  • Loop - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • New_LoopB Not equal to 9
  • (Unit-type of (Triggering unit)) Not equal to Basal Golem created from blood forge
  • (Owner of New_FountainOwners[New_LoopA]) Equal to (Owner of (Triggering unit))
if u didnt look at the integers u use.
also u use triggering unit 3 times so u should store it into a variable and use that.

ahhhh fuckkkkk, that slipped past me.

+ the LoopA mistake.. I wrote it all by hand, on here. I was hopeing I did it ok lmao.
3 uses per loop, *face palms*

Fixes coming in a few seconds.

(Also all of those condition blocks are what "he use to have"

Fixed (though I might not need to null the variable)
 
Status
Not open for further replies.
Top