Suggestion. Change object drop down for an Act,Con,Exp

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • In the C2 coding panel, if I want the same logic done for a second object, I should be able to right click and do a 'change object'. For example, let's say I have 'if Pirate is less than 100 from Ship' logic block with multiple sub conditions. If I want to do the same logic for 'Captain' I should be able to copy paste the block for Pirate and do a 'change all pirate to captain' (one object to another object, all the logic remaining same). I feel this could speed up coding in C2 considerably. Please let me know your thoughts on this, or let me know if there is an easy way out for this.

  • You can already do that and actually it's one of the best features of the event sheet editor!

    Just double click to edit the condition and press back until you get at the "page" where you can select a different object. You will notice that when you press next, all the expressions remain intact.

    EDIT: It seems I didn't read your post carefully. You can do the above but only for one condition. Still, it's very useful.

  • You can do this already.

    First select all the relevant events.

    Then right click on the selection and click "replace object".

    It will then let you pick the object to replace and what to replace it with.

    There are restrictions though. Like you can only replace sprites with sprites or tiledbg with tiledbg objects. And if any of the events access a variable or behavior, the object you replace it with needs it too.

  • R0J0hound to the rescue! I would never notice there's such a thing if you didn't mention, so thanks man, not only for this but for your whole contribution to this community!

  • It's an anti-feature to help people duplicate logic, since it reduces maintainability. In your example, now you have to maintain two identical sets of events, so if you ever change one, then you have to make the same change to the other. If you do this 20x over, then you have a real mess. Families are a better solution: put both objects in a family, then the same set of events applies to all the objects with no duplicated logic.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That helps! Thanks Ashley and R0J0hound!!

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