0 Favourites

Instance invisible? *help*

  • So what i'm doing is i, i have a player that can move and before the start i pin a shotgun to his body that aims to the mouse and when he clicks i spawn a bullet shell at the barrel of the gun, the bullet is there but it isn't visible?

    I want the shotgun to shoot a shell and after a meter i want the shell to burst and let loose the bullets but i cant implement this without the shell.

    Here is the link to the .c3p file, please help me thanks

    drive.google.com/file/d/0B-NhviWrPzlDRTBxdlh1Q2lPSGc/view

    And some image's

    Also, Tips are welcome!

  • Try spawning the shell on a higher layer than layer 0, or otherwise messing with its z-order to make sure that it's appearing on top of the other objects that are already there.

    Also, if you're going to create an object in code there has to exist a version of it somewhere in your project directly on a layout (so that the create expression knows what the default settings would be for the object). I usually just make another layout thats used only for this to toss once instance of my objects I want to spawn onto, or else do it on a load screen or outside of the viewport of the game screen.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Thank you it worked, i already had the instance i knew about that but i just needed to set the layer.

    Try spawning the shell on a higher layer than layer 0, or otherwise messing with its z-order to make sure that it's appearing on top of the other objects that are already there.

    Also, if you're going to create an object in code there has to exist a version of it somewhere in your project directly on a layout (so that the create expression knows what the default settings would be for the object). I usually just make another layout thats used only for this to toss once instance of my objects I want to spawn onto, or else do it on a load screen or outside of the viewport of the game screen.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)