-
Fastloops in subapps
I've been trying to make a game using subapps in MMF2, and I was wondering (because its pretty annoying) - is there any way to make a fastloop communicate with a subapp.
This is the first time I've ever tried to use subapps propperly and so as far as I know the only way you can get things in the subapp to respond to something you do in the parent frame is to set a global value and retreive it in the subapp. (Is there any other way?)
What I want to do is something along the lines of:
On loop x -> set global value A to Listline$(some list,loopindex(x))
and then in the sub app
value A (item) = global value A -> set x position of item to global value A
basically for storing a list of positions in a list file.
I dont suppose this is possible but any help would be much appreciated.
-
Re: Fastloops in subapps
That is what objects such as the Global Function Object are for.
-
Re: Fastloops in subapps
thanks alot and sorry for posting before reading and all that
-
Re: Fastloops in subapps
I don't know if this is a "wrong way" to do it, but I've put loops in an app's Global Event editor. It triggered loops in my main app and the sub-app... The sub-app was a "frame from application".
-
Re: Fastloops in subapps
That sounds quite a good way to do ite
-
Re: Fastloops in subapps
I've been playing around with the global function object and I dont know how to make it do loops (if this is possible??).
The subapp I am using is also a frame from application one. Aidmm, when you do that do you want both the parent and the subapp do the same thing in their loops or do you want the subapp to get values as the loop in the parent sends them?
I understand how you could get them both to do the same loop that way, but I need one to send values and one to recieve in a loop if this is what you mean please tell me how to make it work.. :)
so.. you make a global loop that triggers different loops in both the parent and the subapp?
-
Re: Fastloops in subapps
When I use Loops in the Global Event editor, I do this so that I can call those functions from any frame.
To trigger the loops from another frame, I use the Global Function Object.
I just made a very simple example and uploaded it here.
-
Re: Fastloops in subapps