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

[Trigger] Bugging function or I don't get it.

Status
Not open for further replies.
Level 5
Joined
Apr 14, 2006
Messages
140
Hi all,

I'm actually making a map using a tavern to pick heroes; heroes can also be randommed via "-random" and repicked via "-repick". Each time you pick/random a hero, the hero disappears from the tavern via the GUI command "Neutral buildings - Remove unit-type from all marketplace".
The problem is, that if it works properly with any normal tavern, it won't work as soon as you put would it be only one (human, orc, undead, nightelf) hero in the tavern. It then does not remove heroes any more.
By the way, I experienced crashes (in fact, deconnections) when using "-random" followed by "-repick"; to random a hero, I choose one in an array, then remove the unit-type from the tavern, when repicking, I remove the unit and then add the unti-type to the tavern.

Does anyone have any clues to my problems?

Thanks.
 
Level 14
Joined
Jul 26, 2008
Messages
1,009
I don't quiet understand the english in the second paragraph. Mainly "won't work as soon as you put would it be only one (human, orc, undead, nightelf) hero in the tavern."

Anyways, the only cause for these errors that I can speculate on would come from if you used JASS (I'm a bit unfamiliar with mechanics underlying some GUI.) Such as GetLocalPlayer or using converted Player IDs with the non-converted ones, which would end up calling Neutral players.

Perhaps you're using custom script in your triggers?

At present this may help you where I can't: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hero-selection-systems-38699/
 
Level 5
Joined
Apr 14, 2006
Messages
140
I didn't used JASS, and what I meant in the second paragraph is, that once you add for example human heroes to the tavern, the GUI command "Neutral buildings - Remove unit-type from all marketplace" does not work anymore.
 
Level 14
Joined
Jul 26, 2008
Messages
1,009
Go to the object editor and check the differences between the catagorization of nuetral heroes vs the human heroes and youll understand why that is.

In other words, try changing the Techtree Requirements to Altar, and Race to Creep and see if that helps. I know those buildings can be kinda iffy if they think they're building a race-specific unit.
 
Status
Not open for further replies.
Top