Just wondering if anyone can help me with this:
I have 16 objects on the screen, which are all vertical lines. They can all be turned on and off.
When some of them are turned off I need them to all expand to fill the same amount of space equally, so when there is just one left it fills the whole screen, when there are two they take up 50% each etc.
To get them to be the right width, I've just divided the screen size by number of objects, but I'm having a much harder time getting them to go in the right place, because they can be turned on/off in any order. What I really need is the equivalent to the "space horizontally" thing in the editor.
Any ideas? Thanks!
Develop games in your browser. Powerful, performant & highly capable.
working atm can you send the file?
If their hot spot is to the left you could do this:
global number num=0
sprite is on
--- set num to sprite.pickedcount
for each sprite
--- set x to 640/num*loopindex
Wow thanks, that is exactly what I wanted, worked perfectly! Awesome