1 Reply Latest reply on Jun 4, 2007 1:31 PM by McFazstp

    SpriteChannels more then 150 wont paint, did increase channels

    martijntijn
      I use the following script to generate tiles from an array. I increases the Score Channels to 1000.


      on CreateWorld()
      levelGrid = [ 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 1, 0, 0, 0, 4, 4, 4, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3]
      levelColumns = 10
      levelRows = levelGrid.count() / levelColumns

      x = (levelColumns * 40)/2
      y = 30

      repeat with j = 1 to levelColumns
      repeat with i = 1 to levelRows
      sprite((j * levelRows) + i).puppet = true
      tileType = getAt (levelGrid, ((j * levelColumns) + i)-levelColumns)
      if tileType = 0 then
      sprite((j * levelRows) + i).member = member("tile")
      charX = x
      charY = y
      else if tileType = 1 then
      sprite((j * levelColumns) + i).member = member("wall_vertical")
      else if tileType = 2 then
      sprite((j * levelColumns) + i).member = member("wall_horizontal")
      else if tileType = 3 then
      sprite((j * levelColumns) + i).member = member("corner")
      else if tileType = 4 then
      sprite((j * levelRows) + i).member = member("tile")
      sprite(200+(j * levelColumns) + i).member = member("box")
      put "place box"200+(j * levelColumns) + i,"@",x,y
      end if

      sprite((j * levelColumns) + i).loc = point(x, y)
      sprite(200+(j * levelColumns) + i).loc = point(x, y)
      --put "place tile"(j * levelColumns) + i,"@",x,y
      highestDepth = (j * levelColumns) + i

      x = 40 + x

      end repeat
      x = (levelColumns * 40)/2
      y = 40 + y
      --put "next row"
      end repeat
      put "world created"


      But the tiles sprite(200+(j * levelColumns) + i).member = member("box") wont be painted. Or sometimes they do, but disappear immediate.
      Anyone got an idea how come?