• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Same trigger in 2 different maps. One works, other does not.

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
Hello, Hive!

Few days ago I had my friend Vunjo (coder in my project) to develop a system that gives a random item from a list to all enemy units in the map. Item of the same type shouldn't be given twice to the same unit and each unit should recieve a total of 3 items.

Here is the issue: He developped the system on a test map and it worked properly there. When imported into the project (Sunken City) it caused an issue - units recieved item of the same type more than once.

I'm gonna post the triggers from test map and when imported to Sunken City. There are minor differences which I am familiar with, but I doubt that they cause the problem:
•Test map event is <A unit enters region> and in Sunken City there is no event. There, the trigger is <Run Trigger> when a dialog button is pressed.
•Test map variables are named Mythic. Sunken City variables are called Heroic.
•Test map picks unit owned by P2 and Neutral Hostile. Sunken City picks Player 10, Player 12 and Neutral Hostile. That's obivously because Test map didn't have to use exact same players.
•Leaks in Test Map aren't cleaned. In Sunken City they are.

Test Map Trigger + Initialization
Sunken City Trigger
Sunken City Initialization

To make sure everyone understands the issue: Enemy units in Sunken City recieve 2 items of the same type and in Test map they don't. I want units in Sunken City not to revieve 2 items of the same type. Keep in mind Sunken City is a big map with tons of triggers, variables and data.
 

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
Thanks for the response, but luckily I managed to find the issue which is really simple:

In the link I gave above titled "Sunken City Trigger", I used (Last Created Hashtable). This ofcourse bugs, since I use multiple hashtables in the map. ^_^
 
Status
Not open for further replies.
Top