Idea: translating layout into event code

0 favourites
  • 11 posts
From the Asset Store
Two levels with two sistem Wave. with Source-code (.c3p) + HTML5 Exported.
  • Hi,

    I was thinking about a new feature today that might be useful.

    Once a layout with all its object types is created, to support translating the layout into event/action code. The event/action code can independently recreate all elements in the layout with all properties. Such a feature could be in particular useful to reuse layouts.

    Dan

  • you can just copy paste the objects from one layout to another... the feature already exist.

  • Sargas You are completely missing grossd idea. He want's all objects place and setup by hand on layout to create corresponding events related to their properties.

    If you place object on layout at X50 Y60, then after some magic option you will have an event already created for you - Sprite: Set X50 Y60.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i did understand, but why would you need that if you can already just hand copy/paste anything in the layout?

  • I don't know, ask grossd xD

    Maybe if you setup you layout, and then in events you delete everything on start and recreate particular objects in same places after some actions. You would then already have events with all objects XY coordinates and other properties setup - instead of typing them in manually.

  • Sargas, you need it to work more efficiently.

    Code you can for example put in an even sheet that you include in many other event sheets. For example suppose you want to have a HUD across all layouts, if you copy and paste it into say 20 other layouts, and then want to change somethign you need to go through all 20 layouts and make the change. With code its all in one place.

    Dan

  • but you can ALREADY do that. You could just code it once in it's own event sheet and then include that in any other event sheet that uses it.

  • You can do that, but its tedious. Why not use a visual layout editor, and the press a button and it generates the code for you.

    Same as copy-paste --- you CAN copy paste everything, and the change manually everything when needed. Its already possible, as you say; but its tedious and boring and error prone.

  • I believe Ashley mentioned that importing a LAYOUT into another layout is on the to do list.

    In the mean time. you can set your you HUD objects into a family. Set the HUD family to global. Pop to the HUD layout. Then proceed to whatever layout you want to. You now have your fully custom and modifiable HUD.

    So when you need to remove your HUD, you can destroy HUDFamily.

  • Thanks jayderyu,

    Yes, i know its on the todo list but its not high up there and from what Ashley says its a deeper change.

    HUD is only one example. Global is a great feature when you want something across all layouts. Sometimes you want to be more selective, and reuse only across a number of layouts.

  • Its a good idea. Lots of languages have graphical IDE's which allow this.

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