New topic: Assigning a value to a SSS sprite isn't working right
<http://forums.realsoftware.com/viewtopic.php?t=25239> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message dpaanlka Post subject: Assigning a value to a SSS sprite isn't working rightPosted: Fri Nov 14, 2008 3:22 pm Joined: Sun Mar 23, 2008 3:30 pm Posts: 21 I have a SuperSprite class named WaveSprite that has a shared property called "MyX" which it uses to calculate where it is on each NextFrame. Using the following code I'm trying to build a field of WaveSprites, with X coordinates being saved in the MyX property so that it can be moved back and forth. In the example below, WavesAcross is equal to 11 and WavesDown is equal to 7. It should be putting the numbers 1 - 11 into the aWave.MyX for every 7 columns, however it's putting 11 in everything. Code:For x = 1 to WavesAcross For y = 1 to WavesDown aWave = New WaveSprite aWave.Image = TheWave aWave.Position.X = (x * 200) - 400 aWave.Position.Y = (y * 200) - 200 aWave.MyX = x winMap.SuperSpriteSurface1.Sprites.Append(aWave) Next Next I've been working on this one single thing all day and it's really frustrating me. Why in the world would aWave.MyX = x be "11" for every single sprite? Ahhh!!! Any help would be much appreciated. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
