I'm trying to set up a condition that tests to see if any of the instances of a sprite has a certain value, then affect all of them.
The use is for an upgrade button on an RTS, so that if one of the town halls is upgrading the UnitSpeed, then no other town hall can upgrade that ability.
What I'm needing is to see if there is a simple IF ANY INSTANCE condition can be made. This is a stripped back version of the code dl.dropboxusercontent.com/u/108799982/Capx%20Demos/Upgrade.capx so hopefully someone here can help. <img src="smileys/smiley1.gif" border="0" align="middle" />
When you are upgrading the unitspeed set a global variable for upgrading to true. When upgrading has finished on a building, set it to false. While the variable is set to true, disable any logic linked to upgrading the unitspeed ability. i.e. when bUnitSpeedUpgrade=true > lock out all upgrade buttons.
Develop games in your browser. Powerful, performant & highly capable.
The solution I thought of is probably too easy, but who knows..
<img src="https://dl.dropboxusercontent.com/u/48563442/Probably-too-easy.jpg" border="0" />