Clones & Pin Behavior

0 favourites
  • 6 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • I'm having a very odd problem with my project.

    My game allows the player to customize the character (robot) with owned items/parts.

    What I did was I cloned 'Body2' to make 'Body3' (a lot of work to adjust everything from the start), but even if I don't replace the graphics, the pin behavior is not working right:

    As soon as I change the direction of the robot (that has the cloned body), it goes off place.

    I tried to debug this and double-checked everything. The clone is in all same families, has identical properties and events referring to it. I have the pin behavior in the object family, maybe that's the root of my problems?

  • can you post a capx so we can review/edit it for your?

  • not sure why you'd use a clone instead of another instance, but are all events the same on both clones, are all behaviours and settings for them the same, are they at exactly the same place when the pinning occurs?

    If these questions don't help, adding a capx to review would be the only option..

  • not sure why you'd use a clone instead of another instance, but are all events the same on both clones, are all behaviours and settings for them the same, are they at exactly the same place when the pinning occurs?

    If these questions don't help, adding a capx to review would be the only option..

    I'm trying to make a new type of body (different img file) for the robot. I used an untouched clone in my example just to show that the problem is not in the different image file.

    All events are the same, everything looks same in debugger and settings. Both objects are spawned at player.x, player.y (char.x, char.y) at the start of the layout. Only difference is the name (Body2 and Body3) and the variable to detect which body is chosen (2 and 3).

    Kind of hesistant to post a capx to my game that I've been working for half a year now. If I really can't get this fixed, I'll post a capx that only includes the layouts/objects/events involved with this bug. For now, here's a screenshot of my events:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Still not sure why you'd use clones..

    using an animationframe for this would work fine looking at your events..

    are you destroying all other family-members or could there still be present so the pinning is done to the wrong one?

    what is the difference between char and player?

    Why are there 2 on start of layout events, wouldn't calling a function for the events in playerbuild be more suitable?

  • Still not sure why you'd use clones..

    using an animationframe for this would work fine looking at your events..

    Been thinking of this but I have a simple animation for the mouth of the robot (made with image points). Not sure how well it could be done lag-free with events.

    are you destroying all other family-members or could there still be present so the pinning is done to the wrong one?

    It has no function in Game layout because the robot is only generated once and there's no parts by default to destroy. That event is there just so I can use the same sheet for a preview in a Garage/Store layout (where you customize the robot).

    what is the difference between char and player?

    Char is simply a family that has 'Player' and 'Puppet' objects in them. Both are invisible objects that each part of the robot is pinned to with the difference that Player is in the Game layout, using Bullet behavior and Puppet is in the Store layout using Sine behavior.

    Why are there 2 on start of layout events, wouldn't calling a function for the events in playerbuild be more suitable?

    For some reason when they're all under the same event, it fails to run the actions after the function.

    I have far more experiance in game graphics, so I'm not all familiar with best practices in programming or C2 still.

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