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

[Solved] Weird map bugs I cant seem to figure out.

Status
Not open for further replies.
Level 4
Joined
Aug 12, 2014
Messages
48
I am making an RPG map that has been a work in progress for a few months. I started fleshing out the classes a few days ago when I noticed 2 bugs I cant figure out.

How the map works:
You use a wisp to choose from 15 classes in the game (standard circle of power selection system) and once you pick, that heroes owner/controller is changed to the picking players color and the unit is moved to its starting location. 2 more setup triggers are fired right after this. One that creates a hero inventory system and a second that creates a hero stats system.

Everything works as intended for the first class, Alchemist. This is the first class I created and based all of the other classes from. Meaning I copied/pasted from this class and modified as needed, changing names, stats, spells etc as I moved along.

Bugs:
- (1) When choosing a class, the order of heroes in the hero interface is backwards for some reason. (Except for Alchemist)

- (2) The picked hero class is sharing mana with the others (Skill and Inventory heroes) for some reason. (Except for Alchemist)

Alchemist_Correct.png

You will notice that the first hero is the class, Alchemist, the second is the hero inventory system with no mana, and the third is the hero skill system no mana. This is correct.

Bard_Incorrect.png

In the second image, the hero order is messed up, Bard should be first, at the top of the interface, and his trigger is the first to be run so not sure how the order is changing. The next trigger creates the inventory hero and so on. They also have mana. On top of that, if Bard uses an ability for 20 mana, the other heroes also use 20 mana... There are no triggers that would do this in the map. All the abilities are just the standard abilities thus far. Nothing custom that involves triggering.

Map attached in second post.
 
Last edited:
Level 4
Joined
Aug 12, 2014
Messages
48
I went ahead and created a completely stripped version of the map except for whats relevant to my two bugs. Will make it easier for anyone to try and figure it out. Only semi made classes in this version are Alchemist and Necromancer but all of them are testable.
 

Attachments

  • Stripped Version.w3x
    347.7 KB · Views: 20

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,191
Looks like the bag and book are being created before the hero unit. The order they appear there is based on the order the player acquires an appropriate level of control over them.

The solution should be as simple as giving away the bag and book to a neutral player for a brief period after creating the hero unit and then giving them back to the player. Make sure any code based save is disabled during this time to prevent possible bugs.
 
Level 4
Joined
Aug 12, 2014
Messages
48
Haha, that works. I need to modify a lot of triggers but it seems like it will fix all of the problems. My original thought was that it had to do with the order of events but I forgot to keep in mind the order they are added to the player as well. Thanks Dr Super Good.
 
Status
Not open for further replies.
Top