Record/Store & Load Objects and it's parameters from a File.

0 favourites
  • 7 posts
From the Asset Store
It's here!
$4.95 USD
Creepy and nasty horror track. It's terrifying from the beginning till the end. Goosebumps guaranteed
  • Hi, lads.

    I have to understand, how can i record/store objects in a file and then get it in the Construct 2.

    Some of you can say - "Why do you need THIS when you have a layout?".

    Well, guys. I need not only create objects in the Construct 2 from files, but delete them and create again if needed.

    Imagine yourself a hero. His moving from one direction to another, but location so huge that will cost you big amount of fps.

    But what if objects on a layout will be loading bit by bit when hero get's closer and deleting if he's far away?

    The same technique used in big games - like Assassin's Creed, GTA, The Elder Scrolls, Minecraft and etc.

    There is fourth stages:

    1) Record (Recording of parameters such as - X, Y, Angle and etc. For the multiple number of objects)

    2) Storing

    3) Loading (In-game loading of parameters and creating objects in the game with them)

    4) Deleting (For objects that is far way)


    For any help - HUGE Thanks! You will not be forgotten!

    That can be a year or two, but boomerang will return. Always does.


    If someone want to help me and with that become part of my yet unknown, but already great crusade - then don't be a shy! Send me a letter.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Destroy objects on start of layout and create them when needed..

    If you want to store their values when you destroy them you could do this in a dictionary object or an array in an on destroyed event..

    All you have to do then is making sure when created C2 knows which dictionary/array belongs to the object being created..

  • Well, first thing i will do anyway - it's build a location and then with one-time operation i'll record everything on a file.

    So, every value will be already written and ready to use in anytime. Operation can be only repeat by me if i'll change anything in the game.

    Then all i'll need - it's to spawn and destroy objects in-game if they / or not in the "Field of Loading".

  • Why do you want to use an external file for this when all of your requirements can be done from within C2?

  • LittleStain is right use LOGIC

  • I guess you could try something like this:

    Create an "on destroyed"- event, add a sub-event to check if the destroying means it shouldn't appear anymore (for example if player kills it)

    Push some values like x,y,health,speed, etcetera into an array..

    Every tick check the coordinate values in the array to see if the object should be created or not

    On created set all instance variables to the values in the array and remove the values from the array..

  • LittleStrain, at least now - i know where should i look. Thanks!

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