My Tiles Won't Show and I'm Getting an Error

Amdirant

  • *
  • Posts: 33
I'm getting an error: "ReferenceError: Error #1069: Property tiles not found on com.stencyl.models.actor.ActorType and there is no default value."

Also I have tiles in my game that won't appear. Not sure what's wrong, can anyone help?

Justin

  • *
  • Posts: 4530
What's that tiles extension you're using? Are you sure you're using the blocks how they're meant to be used?
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

Amdirant

  • *
  • Posts: 33
I'm not using any extensions, but I am using custom blocks. I'm following a tutorial and all that's missing is displaying some tiles, everything else works. I've asked in the tutorial comments but haven't received a reply yet.

Justin

  • *
  • Posts: 4530
Ah, sorry, I didn't notice that your 4th screenshot was the custom block definition.

It looks to me like you're using a wrong tileset ID with the "set tile at row" block. Tilesets and actor types, as well as most other Stencyl resources, are all stored in a single resource map. The ID you're using for the tileset is probably actually the ID of an actor type instead.

Code: [Select]
"ReferenceError: Error #1069: Property tiles not found on com.stencyl.models.actor.ActorType and there is no default value."

So it uses the given ID to grab a resource, and then it's looking for the "tiles" property on that resource.

I've made some annotations on your custom block screenshot that should help you out.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

Amdirant

  • *
  • Posts: 33
Thanks so much for all that work, I'm looking at it now and will try to fix it. Thanks again!

Amdirant

  • *
  • Posts: 33
I changed a couple of things namely your suggestion to change a setter to numTempVal and added a "-1" to the random integer there.

I no longer get an error, but (and it's probably very simple) my tiles don't show. The tutorial guy kinda left us to it to put the first tiles in place so it might be that custom block.

You were dead on the money with me square rooting a value from 0-15, and from what I gather that's correct. It's to locate the mouse press on one of the tiles.

I also was occasionally not receiving an error, and you explained why. Thanks so much!

Amdirant

  • *
  • Posts: 33
Basically it's a match cards game with 16 cards, you click on a face down card graphic (layer ID 2) to get rid of it and reveal face up cards underneath (layer ID 1). The face up cards aren't showing for some reason, but I'm used to using the "create actor" function so I'm a bit uncertain on where the tiles are being created.