I'm making a game with buildings that spawn units on a timer and can be upgraded to other buildings. I made the buttons and upgrade (from one building to another) abilities for about 60 buildings. Nearly every building works, except for 5 of them randomly. For some reason, these 5 buildings, when they have the upgrade abilities added onto them, cause the game to crash before the load into it is complete.
When I remove all abilities from these buildings, the game loads and runs fine. Adding on abilities from working upgrade buildings to these broken buildings makes the game crash on load. Adding on the abilities to upgrade for the broken ones to working ones causes the game to crash before load.
I first remade the abilities for the buildings, that didn't work. I remade the buttons, that didnt work. Then I remade every ability again and that didn't work. I recreated the buildings. I changed their models, I compared the broken abilities and buildings to working ones and there is no difference. I did not make the buildings or abilities any different either.
The upgrade ability I am duplicating is "Lair - Morph Building (Lair -> hive)". I then change the "Ability - Commands +" and "ability - info" to the desired building and button associated with the upgrade. I also change the cost, race, and UI - Alert, if that matters.
There are several abilities that cause buildings to upgrade to the same thing. (i.e I have an "Infested Marine Spawn Upgrade to Marauder Spawn" ability and a "Kerrigan Spawn Upgrade to Marauder Spawn Ability". Both abilities call upon the same buttons, but that doesn't cause the game to crash for these.
A version of the game right before the ability creation works fine. Again, when these buildings don't have abilities they load fine, when they do the game crashes. When the associated abilities are used on other buildings, it crashes.
This is one of the last steps on my map and I have been trying to fix it for all of yesterday and today. If anyone has any ideas (I don't care how absurd) PLEASE PLEASE post.
Thank you.
EDIT: Deleting the upgrades to the broken buildings allows for the broken buildings to use their upgrades just fine (no crashing)for some reason. There is then the issue of those lower tier upgrades though.
I'm making a game with buildings that spawn units on a timer and can be upgraded to other buildings. I made the buttons and upgrade (from one building to another) abilities for about 60 buildings. Nearly every building works, except for 5 of them randomly. For some reason, these 5 buildings, when they have the upgrade abilities added onto them, cause the game to crash before the load into it is complete.
When I remove all abilities from these buildings, the game loads and runs fine. Adding on abilities from working upgrade buildings to these broken buildings makes the game crash on load. Adding on the abilities to upgrade for the broken ones to working ones causes the game to crash before load.
I first remade the abilities for the buildings, that didn't work. I remade the buttons, that didnt work. Then I remade every ability again and that didn't work. I recreated the buildings. I changed their models, I compared the broken abilities and buildings to working ones and there is no difference. I did not make the buildings or abilities any different either.
The upgrade ability I am duplicating is "Lair - Morph Building (Lair -> hive)". I then change the "Ability - Commands +" and "ability - info" to the desired building and button associated with the upgrade. I also change the cost, race, and UI - Alert, if that matters.
There are several abilities that cause buildings to upgrade to the same thing. (i.e I have an "Infested Marine Spawn Upgrade to Marauder Spawn" ability and a "Kerrigan Spawn Upgrade to Marauder Spawn Ability". Both abilities call upon the same buttons, but that doesn't cause the game to crash for these.
A version of the game right before the ability creation works fine. Again, when these buildings don't have abilities they load fine, when they do the game crashes. When the associated abilities are used on other buildings, it crashes.
This is one of the last steps on my map and I have been trying to fix it for all of yesterday and today. If anyone has any ideas (I don't care how absurd) PLEASE PLEASE post.
Thank you.
EDIT: Deleting the upgrades to the broken buildings allows for the broken buildings to use their upgrades just fine (no crashing)for some reason. There is then the issue of those lower tier upgrades though.