The Daily Click ::. Forums ::. Klik Coding Help ::. Mmf2 global events..
 

Post Reply  Post Oekaki 
 

Posted By Message

hapsi



Registered
  13/11/2003
Points
  775
15th January, 2013 at 15/01/2013 15:36:46 -

Why there is no "Global to the entire application" option in my event groups in MMF2?

 
[Signature][/Signature]

nivram



Registered
  20/07/2006
Points
  171
15th January, 2013 at 15/01/2013 17:46:03 -

It should be in the "Properties" for the object.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

hapsi



Registered
  13/11/2003
Points
  775
15th January, 2013 at 15/01/2013 18:27:20 -

There is a check box "global object" in most objects properties but that doesn't answer my question.

 
[Signature][/Signature]

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
15th January, 2013 at 15/01/2013 20:43:41 -

Do you have an example of your specific problem? This might just be a missed-communcation thing.

Once the Object has that "Global" box checked, then regardless of the frame that's active, then all information remains: alterable values, player scores, etc. However, later visits to the same frame will reset everything else about the frame.

For example, imagine I have a platform level. When the level is visited for the first time, then a Global object is used to somehow determine the presence of bonus pickups on the level. If the player picks them up, then the Global object records that in its various values, flags, etc.

Meanwhile, enemies on the level are not determined by the Global object, and simply appear at runtime. Each time the player visits that level, enemies will always appear, although the bonus pickups do not.

Is this similar to the situation you're facing? Please give more details.

 
n/a

hapsi



Registered
  13/11/2003
Points
  775
15th January, 2013 at 15/01/2013 22:12:29 -

I have a game engine done in mmf2 and i would like if i didn't have to copy-paste the engine events to each level when i find a bug.

 
[Signature][/Signature]

nivram



Registered
  20/07/2006
Points
  171
15th January, 2013 at 15/01/2013 23:05:44 -


Originally Posted by hapsi
I have a game engine done in mmf2 and i would like if i didn't have to copy-paste the engine events to each level when i find a bug.



All you have to do after the object is global is to have it in each frame. Then just change the Global Event(s) one time and the changed events follow the Global Object.

Can you post your mfa?

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
15th January, 2013 at 15/01/2013 23:08:40 -

Sorry to sound completely uninformed here, but...

We can have all our events in one single frame, then build our levels in separate frames, with no events in them? (Providing the events are global?) Is there any disadvantage to this?

 
Image

Tell 'em Babs is 'ere...

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
16th January, 2013 at 16/01/2013 02:03:47 -

Well, global events aren't located in any one frame, but in the properties window for the application itself (under "events"). You can theoretically code as much as you can in the global events area, but unfortunately global events don't support qualifiers, which is a big part of an efficient, adaptable game engine.

I'm not really sure how most people manage this issue, between copy-pasting large chunks of code, or else globally coding without qualifiers. I think the ideal solution is to come up with a way to load levels dynamically into a single frame, which allows for tidy coding in a single spot, with all the advantages that qualifiers bring.

But this is a difficult thing to undertake, and kinda defeats the purpose of using something like MMF in the first place.


...Yeah, it's not a great situation.

 
Go Moon!

hapsi



Registered
  13/11/2003
Points
  775
16th January, 2013 at 16/01/2013 12:30:17 -

Weird thing is that mmf2 global event don't support qualifiers. I have around <3000 events with <500 unique objects, so it's kind of impossible to handle this without qualifiers. Good thing is that i have one level specific event group to each level. So the only harm of having to do the copy-paste is having to do the copy-paste..

 
[Signature][/Signature]

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
16th January, 2013 at 16/01/2013 15:36:17 -

Clickteam did explain their reasoning for not implementing global qualifiers just a few days ago - but the thread contained a fair number of abusive posts and has since been locked, so I can't view it any more. Basically, they were saying it would be too complicated because of the way MMF2 is coded, and that you'll have to wait for MMF3.

As far as I'm concerned, there are bigger problems with qualifiers than this - like not being able to reference alterable vales/strings by name (that alone makes them pretty useless for large scale projects), not being able to rename them or change their icons, and not being able to assign them at runtime.
I don't see what's so bad about copying and pasting code - it takes about 3 mouse clicks (which is why behaviors are worse than useless too).

Even if we accept that you are forced to create your own level editor for each game you make, that really doesn't defeat the purpose of using MMF2. The frame editor is just one small part of MMF2 - you still benefit from the simple coding "language", the animation editor, the ability to export to various platforms, etc.


@Hapsi - What I usually do instead of using qualifiers, is to use one active, and then store the different "objects" in different animations/directions within it. For example, in my tank game ( http://www.create-games.com/project.asp?id=2295 ) all the units in both armies are made up of the same two objects - a "hull" object and a "turret" object. They have alterable values to say which army they belong to (red/yellow) and what type of unit they are (light tank/heavy tank/rocket launcher).

For example: I remember seeing that it was possible in your game to pick up weapons etc dropped by dead soldiers. I don't know how you've implemented that, but personally, I would only have one "DroppedItem" object to be shared between them all. I definitely wouldn't make each different item a different object with a shared qualifier.

 
n/a

hapsi



Registered
  13/11/2003
Points
  775
16th January, 2013 at 16/01/2013 20:47:58 -

@Sketchy I do use actives the way you do, just not as much. Usually when the active is random each time. Bushes, and other world objects quite meaningless to the gameplay mostly. Basicly you could do the whole game using only one active, but that might be a little frustrating. It's also easier in mmf2's level editor to place objects when you don't have to do extra work for it to be the one you want(different size of tiles for example).

 
[Signature][/Signature]
   

Post Reply



 



Advertisement

Worth A Click