| 07-17-2007, 08:00 PM | #1 |
I'm working on a kind of AoS map where you construct barracks of different types to auto-train units to send toward the enemy (like castle fight, tech wars etc.). For some reason, neither of my buildings can upgrade to their next level. The button is there, but greyed out. I get no error message when clicking it. The weird thing is, I can upgrade if I do so quickly after construction. I have no idea whats causing this, If i select the building and wait for the button to grey out, it never happens. I suspect the problem to be connected to the auto-spawn system. The system auto-trains a new unit when either of the following events occur: * I deselect the building * A unit finishes training * The structure finishes construction Anyone encountered anything like this? Could be something really simple, no idea. |
| 07-17-2007, 09:29 PM | #2 |
Only thing that comes to my mind is check the tech-requirements of the upgraded version. |
| 07-17-2007, 10:34 PM | #3 |
* A unit finishes training * The structure finishes construction dual event, why? deselection event have to sync with other players (this is source of delay) it may cause some kind of desync. upgrade button is gray when some unit is training or building is frozen\stunned and other debuffs. just check if any unit in training ladder, im sure there is functions for it. |
| 07-17-2007, 10:38 PM | #4 |
you cannot have a unit and building upgrade in the queup line at the same time. It isnt allowed by warcraft 3... this isnt a trigger problem... its a hardcoded problem. |
| 07-17-2007, 10:56 PM | #5 |
I know that I have to cancel unit production when upgrading. My problem is that the upgrade button is still greyed out. I meet the requirements. I can upgrade the structure for like 5 min after being built, after that it becomes greyed out. I have no idea WHEN it occurs, I've only noticed it happens to all my buildings sooner or later within a few minutes after their construction. The two events are because I need the structure to start training after its constructed, and then to continue training after it finishes training a unit. Are you saying the deselection de-sync could have something to do with the problem or are you just stating it? The deselection event does work fine and starts a training as supposed to. I've actually tried letting all the events occur etc., but I've never been able to create the bug on purpose. It just happens randomly (seemingly) within a few minutes after construction. |
| 07-17-2007, 10:57 PM | #6 |
its probably a dysnyc from the looks of it. |
| 07-17-2007, 11:05 PM | #7 |
And what do you suggest I do? Does the fact that I've only tried this singleplayer matter? |
| 07-17-2007, 11:12 PM | #8 |
if you added invalid unit type to training ladder you may crushtraining process. i cant test it for now, but invalid types crush most jass functions, also internal functions maydo same. just check what you passing to training. |
| 07-17-2007, 11:17 PM | #9 |
Oh well actually the training trigger orders the unit to train all unit types in the game (about 10 total). To save me from making a if/then/else mass :) I know its a very stupid way of doing it, but I saw no problem with doing so. But I've tried letting it autoproduce units for like 2 minutes and that didnt prevent me from upgrading. I still dunno WHEN it happens, it just suddenly does. |
| 07-17-2007, 11:22 PM | #10 |
not only this bugout randomly. "same handles problem" is caused by triggersleep+trigger destroy dont you doing something like it? |
| 07-17-2007, 11:34 PM | #11 |
I use triggersleep in some other triggers (not in the training ones though) but not trigger destroy. edit: I'll do some more thourough testing to find the event (if there is any...) that causes the problems in 10-15 minutes or so. edit2: Ok tested some more. Appears to happen after the unit has succesfully trained a unit. This was not the case with another building though... that building could produce several units before getting this. It does happen to all units that auto-spawn units though. edit3: Tested even more. Appears that the problem occurs when the structure auto trains a new unit after finishing training a unit. The problem was solved by a adding a 0,1 second wait before training the new unit. Still curious though, why can't you train a new unit too quickly after finishing training another unit? |
