Can a Sub-Application transfer its state to another Sub-Application in another frame?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi, I've run into a technical issue with save states using the sub-application.

    I have two frames, each with a sub-application object in them, both sub-app objects are set to run the same frame and are set to include Global Values.

    In the game, the player will be viewing one frame, whilst the first sub-app runs a different frame in the application, and eventually the player will be taken to view another frame that has its own sub-app.

    However, when this change occurs, the sub-app in the final frame is at its default state, whereas I want it to have the state of the sub-app that came before.

    The sub-app object is running a frame where the enemy AI is executed. My game has a lot of complicated stuff, so I've segmented different areas into different frames, hoping I could keep the enemy AI frame running uninterrupted in the background regardless of what frame is being shown.


    Please login to see this attachment.


    I'm basically wondering if two sub-application objects both set to run a particular frame, whilst also being placed inside two different frames, can transfer the current state of the particular frame they are running to each other?

    Or if I can make one sub-application object run in the background uninterrupted for the whole application while the frame the player views changes?

    I haven't had to deal with save states before, so please forgive me if there's a common, obvious solution.

    I am open to any method of running this AI frame in the background uninterrupted by frame changes. I've thought about using Global Values and Counters to store the positions and states of the AI frame, but it's a very complicated frame, and I don't want to have to store each and every possible state manually if I don't have to.

  • Quote

    However, when this change occurs, the sub-app in the final frame is at its default state, whereas I want it to have the state of the sub-app that came before.

    hello sorry for my bad english, I am french...
    It's not easy to reply you because I don't know enough about your project, but what I understand you have 2 subapps pointing the same frame, and you want one communicate the other that it has a event to do ('the state change')..

    in this case I think better is to not share global values/string with the parent to discriminate the 2 subapps.

    I create a little mfa (see attachement) with 2 supabb that pointing the same frame and communicate together in 3 manners:


    1. through global values
    2. through windows registry
    3. with share value object

    note that could be other manner, there are a lot of way to do it

    Quote

    Or if I can make one sub-application object run in the background uninterrupted for the whole application while the frame the player views changes?

    Yes! of course! clearly!
    in this case you have on root (main/first frame) 2 subapps, 1 "background" that do what it has to do (that could be invisible by user), and another "what user view" with change ect...
    In fact more you have subapp correctly implemented, and more powerfull will be your application
    the application of my project is full of subapps, in main there are 5 subapps visible that working ininterrupted and could be called by the user (it could see just 2), there are visible and invisibles subapps... subapps of subapps... subapp of subapps of subapps too...

    more you have subapp more complex and complete will be your app

    ypu have to correct "brainstorm" the "three" of hierarchy" of you subapps and your app will be good and powerfull.
    I advise you to create "dumb application" with just subapp and frames corresponding of your project , to see/test before creating directly the real.

    good luck

  • Hi, thank you for answering me. I'll try to look into that stuff. I decided to restructure my game and include the entire region I'm referring to into one frame to avoid the issue for now. (And what caused me to deal with the original issue ended up not being necessary to my workflow anyway :P r o g r a m m i n g)

    But now, I've got to figure out something to do with memory leaks in my game. I'll post a new thread really soon and probably attach my current mfa, because I really don't know why my current memory leak is happening.

    Anyway, thank you for your attention, I'll try to address the problem in this thread soon, once my current other issue is dealt with.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!