HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Adding Units to a Tavern Problem

02-27-2007, 10:58 AM#1
StockBreak
Hi, I am trying to add 12 units to a neutral building by using the function AddUnitToStock, but when I run the game there is always a black empty space on the bottom of my tavern and one of my units it's not added.
I tried to put the "Sell Units" ability (required in order to add units to a neutral building) on a disabled spell book but the game crashes very bad with a fatal error during the loading. Any way to solve this? Thanks.

N.B: I need to add the units with that function and NOT using the field "Unit sold" because the units need also to be removed.
02-27-2007, 11:13 AM#2
zen87
i guess the one blank spot is for the select hero button, after all one tavern can only take 11 units only O_o
02-27-2007, 11:34 AM#3
Rising_Dusk
You could add a button to the tavern that causes the tavern to bring up a second 'list' of heroes.
That way you'd have a default tavern with 10 heroes and a button to bring up the next set.
And so forth.

That'd probably be how I'd do it if I absolutely had to use tavern select.
(Though I do detest tavern select myself.)
02-27-2007, 12:24 PM#4
StockBreak
Quote:
Originally Posted by zen87
i guess the one blank spot is for the select hero button, after all one tavern can only take 11 units only O_o
Well, if you add them using the field Unit Sold you can have up to 12 units on a tavern (and the Select Unit ability doesn't require any space), but using the Sell Units ability one space is blank.
I could disable units for every player (instead of removing them), but it works only for heroes and not for units (someone knows why)?
02-28-2007, 03:32 AM#5
Av3n
Just wondering why are you using units as well? If you are use an seperate one forgot the trigger but in GUI (Yes i know you hate it i think) Its Removes it or something but you've to add by triggers (Somewhere but im not sure) But why doesn't it work with units eh?

-Av3n
02-28-2007, 10:24 AM#6
StockBreak
Quote:
Originally Posted by Rising_Dusk
You could add a button to the tavern that causes the tavern to bring up a second 'list' of heroes.
That way you'd have a default tavern with 10 heroes and a button to bring up the next set.
And so forth.

That'd probably be how I'd do it if I absolutely had to use tavern select.
(Though I do detest tavern select myself.)

Well, for now I solved using a button for a "random unit" which is always the same... Thanks.

Quote:
Originally Posted by Av3n
Just wondering why are you using units as well? If you are use an seperate one forgot the trigger but in GUI (Yes i know you hate it i think) Its Removes it or something but you've to add by triggers (Somewhere but im not sure) But why doesn't it work with units eh?

-Av3n

I don't know why it doesn't works only with units
Simply if you make a unit unavaible it will show it BTW on the shop, a hero won't show anymore... I tried also to set the maximum number of units avaible to 0 but as above it works only with heroes
03-01-2007, 02:28 AM#7
Av3n
Thats just WTF? But maybe try tecttreeing itit looks messy but who knows?

-Av3n
03-01-2007, 08:57 AM#8
StockBreak
Quote:
Originally Posted by Av3n
Thats just WTF?

Ye, it seems so
03-01-2007, 11:44 AM#9
Rising_Dusk
Just add your units to the tavern at runtime, then remove them when they are selected.
If I get what you're saying, that's what you were having trouble with --
Not letting people select multiples.
03-01-2007, 12:32 PM#10
StockBreak
Quote:
Originally Posted by Rising_Dusk
Just add your units to the tavern at runtime, then remove them when they are selected.
If I get what you're saying, that's what you were having trouble with --
Not letting people select multiples.
It is what I have done, but the problem is that I can't add 12 units to the building (see my first post).
03-01-2007, 01:00 PM#11
Rising_Dusk
Make multiple taverns?
Or you can use the button swap I suggested earlier.
03-02-2007, 01:17 PM#12
StockBreak
Quote:
Originally Posted by Rising_Dusk
Make multiple taverns?
Or you can use the button swap I suggested earlier.
Actually I solved the problem by adding a "random unit" to the building's sold units which is always the same. Thanks BTW.