How do I spawn an object with behaviours?

0 favourites
  • 4 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hey, I'm trying to spawn an object and it have gravity and be solid like the rest, but for some reason when it's spawned it has absolutely no behaviours. From the events all it does is just go forward with no gravity through the whole level. (I have it set to always move forward, and since it has no gravity it flies away.) It might be a setting since I suck and missed it, or maybe I'm meant to do something in events so it works, I'm not sure.

    The title might make it seem like I'm spawning an object with new behaviours - that is not the case. I want the object to use what I've already set it to use, but it never does. They're both the exact same object, the only problem is the spawned one isn't the same like it should be.

    Here's a video of the issue. Don't hate me for remaking this game, also. It's for a good cause. (Of pissing off my friends.)

    Edit: I'm not allowed URL links, so a broken one it is:

    http*://youtu.*be/hN1cHBLj-AU

  • Can you post a copy of your capx? It would be easier for someone here to help if we could see your events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sauxez

    Take a look at this article in the Construct 2 wiki which talks about default instances:

    https://construct2.wikispaces.com/Default+Instances

    I have a feeling it's related. Basically, when you create something at run-time, it sets the default properties of the new instance to the "prototype instance". If that prototype instance has gravity set to 0, then so will any new instances at creation.

  • Sauxez

    Take a look at this article in the Construct 2 wiki which talks about default instances:I have a feeling it's related. Basically, when you create something at run-time, it sets the default properties of the new instance to the "prototype instance". If that prototype instance has gravity set to 0, then so will any new instances at creation.

    The legend

    Thanks man, if only I had asked earlier about a different project.. would of saved so much confusion. All I had to do was reload everything. You're right, too - I changed some stuff around later on in the same session. You have the Construct guru feelings.

    Edit: Alright that worked the first time and now it never works. Could you explain to me in English what that link you sent is saying? There's an XML file on the first layout and layer is all I really understood, I haven't a clue on how you're meant to access or change it.

    Another edit: I fixed it for good now, I just remade the entire mushroom and it's events, now it works fine.

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