Jump to content


raksha0xx

Member Since 24 Mar 2012
Offline Last Active Nov 19 2017 04:46 PM

#1051007 ChainedButton and UpgradeGroupsToRemove cause crashes

Posted by raksha0xx on 15 February 2017 - 11:16 PM

Hey Guys,

 

I'm working on a special ability/function for dwarven buildings. The function should be turned on and off.

The on- and off-switches should both activate a special power to de/-activate that function. In order to have only one of those Buttons at the time, the commandset needs to be switched simultaneously.

 

Enough of the exposition. I had two approaches.

One of them is to activate a special weapon that is chained with two other buttons. One of the buttons switches the weaponset, the other changes the visible buttons in the commandset (like the fortress).

Spoiler

 

The final problem occurs, if I the ChainedButton is used -> the game freezes. If the chainedbuttons are commented out there's no problem.

Are these buttons invalid commands to be chained with a specialweapon?

 

 

Before I tried to realise that approach, I had the idea to make the function with upgrades that can be activated, that trigger the weapon and new commandsets. In order to use the function more than one time, an upgrade has to be removed. (As in the following code).

Spoiler

 

If the removeupgradeupgrade-tags are active and the removal is triggered, the game crashes.

 

I hope anyone of you has an idea how to solve one of those problems.

Maybe there are even more approaches, that I haven't thought of.

Thanks in advance.