The Daily Click ::. Forums ::. Klik Coding Help ::. Are behaviors, global events, or normal events processed first?
 

Post Reply  Post Oekaki 
 

Posted By Message

NMasutaa



Registered
  26/12/2004
Points
  301
26th December, 2011 at 20:12:02 -

I'm making an RPG and trying to make it so that I don't have to copy the dialogue engine to every frame, and then re-copy it whenever I make a change to the engine. So I figured I should move the events into either Global Events or an object's Behaviors, except I can't do that because some of the events have qualifiers.

Moreover, if I copy only the events without qualifiers, much of the engine depends on the order of events, and I'm not sure about the order of whether Global Events, Behaviors, or normal events come first.

Any suggestions?

 
n/a

Alonso Martin



Registered
  29/12/2010
Points
  294
26th December, 2011 at 23:09:09 -

As far as I remember, the frame event list is read first, then the global values and then the behaviours. I'm not sure how the order of behaviours is determined, but maybe it's done by the z-ordering of objects.

 
www.hfalicia.com
www.alonsomartin.mx

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
26th December, 2011 at 23:27:58 -

I recommend you stay away from behaviours and global events. It's easier and more efficient to just make the whole game in a single frame.

 
n/a

NMasutaa



Registered
  26/12/2004
Points
  301
27th December, 2011 at 06:28:30 -

Is it really better to make the game in a single frame? I can see that as being a good idea, but I've never done that before, so are there any tutorials that have any good advice for doing that?

 
n/a

NMasutaa



Registered
  26/12/2004
Points
  301
27th December, 2011 at 06:32:32 -

One reason why I feel that having multiple frames is better so that each frame can have its own backdrops, since they can't just be created/destroyed if a single frame were to play different scenes. Is there a way around this, other than to change the position of the screen in an incredibly large frame to switch between different sets of backdrops?

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
27th December, 2011 at 09:48:47 -

Its possible to create custom backdrop loading by using objects like the Active Picture Object, surface, etc- both their create/load images and their "paste image to background" functions. Doing this can let you create true engines in a single frame that play an entire game. The drawback is the amount of extra work that goes into this. Using the built-in level editor and backdrops of MMF2 lets you cut down on the effort needed to make a whole game, and using global events can be a shortcut to work with this.

I'm not sure the order of behaviours being processed vs global events, but I know they are both simply the same thing as appending that code onto the end of the event editor; so its always after, but intrinsically neither actually does anything functionally different, its just a copy/paste job

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

nim



Registered
  17/05/2002
Points
  7233
27th December, 2011 at 11:28:01 -


Originally Posted by NMasutaa
Moreover, if I copy only the events without qualifiers, much of the engine depends on the order of events, and I'm not sure about the order of whether Global Events, Behaviors, or normal events come first.

Any suggestions?



The order is: Frame Events - Global Events - Behaviors

 
//

Neil Butcher



Registered
  06/06/2010
Points
  133
27th December, 2011 at 16:21:46 -

As some of these people mentioned, it is a better idea to run everything from a single frame and load the levels/backdrops into it. Like Pixelthief said, you can use the surface object or the active picture object (a little more straight forward) to change the backdrop.

For an example of one way to make external levels to load into the frame, you can check out Ultimate World Creator. It's a tile-based level editor for making array based levels to load into a single frame. The download comes with a great example on how to load and use the levels. I made it to use for games like what you are talking about making.

http://www.ultimateworldcreator.x10.mx/

 
_____________________________________
UWC - http://www.ultimateworldcreator.x10.mx
MMF2 Examples - http://www.neilbutcher.ultimateworldcreator.x10.mx/examples_01.html
   

Post Reply



 



Advertisement

Worth A Click