• 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.

Strange error when units hike!!!

Status
Not open for further replies.
Level 2
Joined
Aug 6, 2012
Messages
27
Hey guys I just created a custom map about defending against some waves of monsters.

But I met a very strange phenomenon that the monster - after destroying some structures - do not go on to come to the remainder of the map. Then they stand around in the location marked by red below:
attachment.php



Can you guy download my map and check for me the problem:vw_death: thanks much!!!!
 

Attachments

  • ssssss.jpg
    ssssss.jpg
    34.2 KB · Views: 211
  • defence.w3x
    88.5 KB · Views: 30
Level 12
Joined
Mar 24, 2011
Messages
1,082
You don't have "benminh" region so the war3 automaticaly assumes "center of playable map area".

Btw your triggers are leaking a lot of points. And some use for event evry 0.5 sek but have triggering unit in conditons and stuff...

Other wise pretty challenging. Impossible to go through it solo. With a few custom spells, heroes and bosses mechanics would be a good 2player co-op map.
 
Level 2
Joined
Aug 6, 2012
Messages
27
You don't have "benminh" region so the war3 automaticaly assumes "center of playable map area".

Btw your triggers are leaking a lot of points. And some use for event evry 0.5 sek but have triggering unit in conditons and stuff...

Other wise pretty challenging. Impossible to go through it solo. With a few custom spells, heroes and bosses mechanics would be a good 2player co-op map.

But I have this:

  • Set benminh = Region 002 <gen>
So benminh is not the problem?:vw_wtf:
 
Level 2
Joined
Aug 6, 2012
Messages
27
Why do you use not directly the region itself but a variable? And no it is the problem. The trigger where that is has no event so it never fires. It isn't run by other trigger either.

thank you so much! I forget the Event option!

Bcz at first I'd decided to make some variables to combine waves, but then I changed my mind.

Also can you show me some of my leaks and the solutions?
 
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
center of region leaks a point

It creates a point then it uses it but it doesnt get removed and you cant use it again or do stuff with it.
First spoted is
  • hero1
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: You must come to th...
      • Camera - Pan camera for Player 1 (Blue) to (Center of Region 003 <gen>) over 3.00 seconds
      • -------- Point Leak --------
It should become this (same for hero2)
  • hero1
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: You must come to th...
      • Set TempPoint = (Center of Region 003 <gen>)
      • Camera - Pan camera for Player 1 (Red) to TempPoint over 3.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
The 2 triggers can be merged in one.

Like this
  • heroes
    • Events
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: You must come to th...
      • Set TempPoint = (Center of Region 000 <gen>)
      • Camera - Pan camera for (Triggering player) to TempPoint over 3.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)

Then
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 000 <gen>) over 3.00 seconds
      • -------- Point Leak --------
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 000 <gen>) over 3.00 seconds
      • -------- Double Point Leak --------
      • Player - Set Player 1 (Red) Current lumber to 100
      • Player - Set Player 2 (Blue) Current lumber to 100
      • Player - Turn Gives bounty On for Player 3 (Teal)
      • Game - Display to (All players) for 10.00 seconds the text: Ban nhan duoc 1000 ...
      • Player - Add 1000 to Player 1 (Red) Current gold
      • Player - Add 1000 to Player 2 (Blue) Current gold
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
It should be like this
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempPoint = (Center of Region 000 <gen>)
      • Camera - Pan camera for Player 1 (Red) to TempPoint over 3.00 seconds
      • Camera - Pan camera for Player 2 (Blue) to TempPoint over 3.00 seconds
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Player - Set Player 1 (Red) Current lumber to 100
      • Player - Set Player 2 (Blue) Current lumber to 100
      • Player - Turn Gives bounty On for Player 3 (Teal)
      • Game - Display to (All players) for 10.00 seconds the text: Ban nhan duoc 1000 ...
      • Player - Add 1000 to Player 1 (Red) Current gold
      • Player - Add 1000 to Player 2 (Blue) Current gold
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
Then you have every wave spawn trigger. We can overlook the number of triggers but they just spam leaks.

  • w1
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Player - Add 300 to Player 2 (Blue) Current gold
      • Player - Add 300 to Player 1 (Red) Current gold
      • Game - Display to (All players) the text: Ban vua nhan duoc t...
      • Wait 5.00 seconds
      • Game - Display to (All players) the text: Next wave begins...
      • -------- The next line isn't needed at all --------
      • -------- And I think it leaks a player group... --------
      • Player Group - Pick every player in Player Group - Player 3 (Teal) and do (Actions)
        • Loop - Actions
          • --------Pro coders will say to use Variable Integer for loops. I am not pro or anything near it and don't understand the reasons behind this--------
          • --------I think it was something like "Integer A/B bugs when used globally simultaneously by more than 1 trigger at a time." *quoted from defskull* :)--------
          • --------So use variavle for loops--------
          • For each (Integer A) from 1 to 10, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Ghoul for Player 3 (Teal) at (Center of Region 001 <gen>) facing (Player 4 (Purple) start location)
              • -------- I don't think a starting location is a good reference... better use actual degrece... --------
              • AI - Ignore (Last created unit)'s guard position
              • Unit - Order (Last created unit) to Attack-Move To (Center of benminh)
              • -------- Double point leak --------
      • -------- And now the best. This trigger leaks 20 points because for each loop is created a new point. --------
So it should become like this

  • w1
    • Events
      • Time - Elapsed game time is 60.00 seconds
    • Conditions
    • Actions
      • Player - Add 300 to Player 2 (Blue) Current gold
      • Player - Add 300 to Player 1 (Red) Current gold
      • Game - Display to (All players) the text: Ban vua nhan duoc t...
      • Wait 5.00 seconds
      • Game - Display to (All players) the text: Next wave begins...
      • For each TempInteger from 1 to 10, do (Actions)
        • Loop - Actions
          • Set TempPoint = (Center of Region 001 <gen>)
          • Unit - Create 1 Ghoul for Player 3 (Teal) at TempPoint facing 90.00 degrees
          • Custom script: call RemoveLocation(udg_TempPoint)
          • AI - Ignore (Last created unit)'s guard position
          • Set TempPoint = (Center of benminh)
          • Unit - Order (Last created unit) to Attack-Move To TempPoint
          • Custom script: call RemoveLocation(udg_TempPoint)
Every wave trigger leaks. Fix them all :)

You can reduce some calls here and there but I think for now fixing only leaks is ok.

So thats all I think.
As in one of bribes(I think it was his tut) tutorials on polishing(or something like that) triggers "spotting leaks is not a magical ability" and they are pretty easy to spot.

Edit//
nedio95 linked a thread in his first response, go read it.

Y-yea that too... :grin:
 
Level 2
Joined
Aug 6, 2012
Messages
27
Thanks again for your huge enthusiasm !
I'll try to fix them all soon.

A final question: But if we leave the leaks existed, how they affect our game? :D
 
Status
Not open for further replies.
Top