debugging : where is this ghost actor coming from?

Is there any way to output information like "This scene has X actors in it"? Or any other information about the actors, like their names?

I've got a scene that, after 5 seconds, is supposed to start populating itself with actors. My problem is that as soon as the scene appears, one of my actors is already on screen. For the life of me I can't figure out why. I've literally gone into the UI and deleted every actor in the scene (by selecting it and then hitting backspace), but as soon as I hit Preview my single actor shows up.

That would indicate to me that I've got an extra "spawn" statement that is creating a brand new one when the game starts, wouldn't it? If I'd accidentally added one to the scene shouldn't I be able to see it in the editor? It always appears in exactly the same spot, and I can't tell if that's because I put it there in the editor and now can't seem to delete it, if my spawn statement says to put it there, or if I'm trying to randomize it (the other instances of this actor will appear randomly) but because it's the first instance the random seed is always the same.

Other than log debug statements, what other tools can I use to track down this ghost?

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @dmorin@gmail.com said:

    Have you checked in Layers to see if it's there ?

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    That's strange. Maybe it's a graphical issue? I've seen the creator bug out before graphically on preview with like a white box instead of the actual preview. You're sure no actors exist on the scene?

    Follow us: Twitter - Website

  • dmorin@gmail.comdmorin@gmail.com Member Posts: 19

    @Socks said:
    Have you checked in Layers to see if it's there ?

    I have no idea what Layers is? If you mean "Layout", all I see in the menu option is a bunch of send to back / send to front options. The actual editor never shows me a box that would represent this ghost actor.

  • dmorin@gmail.comdmorin@gmail.com Member Posts: 19

    @Socks said:
    Have you checked in Layers to see if it's there ?

    I have no idea what Layers is? If you mean "Layout", all I see in the menu option is a bunch of send to back / send to front options. The actual editor never shows me a box that would represent this ghost actor.

  • dmorin@gmail.comdmorin@gmail.com Member Posts: 19

    @AlchimiaStudios said:
    That's strange. Maybe it's a graphical issue? I've seen the creator bug out before graphically on preview with like a white box instead of the actual preview. You're sure no actors exist on the scene?

    How "sure" I am is the big question. Here's a new clue, maybe this will help. I figured out that if I highlight the last actor I added to the scene and delete it, then the next-to-last actor will be highlighted. Cool. So I delete, delete, delete and each time a box shows up on the screen...until about 7 actors in. Then I don't get a box. Hmmm. I delete again, and a box shows up again.

    Aha! That must be my ghost, the one without a box. I've confirmed that when I do that extra backspace over that one, my mystery actor no longer appears.

    So the million dollar question remains, how the heck do I get it out of there? The solution of "cut out 7 other actors until you happen to back onto it and then put those other 7 actors back" isn't really a good one ;)

    I did completely quit out of the app and restart, but the problem persists. I've taken to poking around the XML files (something I've got plenty of experience with from my day job, no worries) in case that yields any clues.

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @dmorin@gmail.com said:
    I have no idea what Layers is?

    In the Inspector, click on Scene, then on the Layers tab.

    Open the Layers (click on the drop-down triangle) and see if the rogue actor is actually in the scene or not.

  • dmorin@gmail.comdmorin@gmail.com Member Posts: 19

    @Socks said:
    Open the Layers (click on the drop-down triangle) and see if the rogue actor is actually in the scene or not.

    Genius! That was it exactly. Opened Layers, saw list of actors in the scene, determined that one of them was indeed my rogue. Got rid of it there and the problem went away! Thanks!

  • SocksSocks London, UK.Member Posts: 12,822

    @dmorin@gmail.com said:
    Genius!

    Yes, the Layers panel was all my own work, nothing to do with GameSalad :p

Sign In or Register to comment.