The Daily Click ::. Forums ::. General Chat ::. Code Editor

Post Reply  Post Oekaki 

Posted By Message

David Newton (DavidN)



Honored Admin Alumnus
19th May, 2005 at 12:37:38 -

Here's a thought that came to me while I was trying to type out Click events for someone and couldn't think of what syntax to use - would it be useful if a future version of MMF (or other Click product) had a Code Editor alongside the standard Event Editor, as if it were a more quickly editable version of MMF's Event List?

The Event Editor is certainly much more friendly, but I do find myself often wanting to quickly change an action in a long list of them - this involves a lot of clicking through menus to get to what's needed. If long sequential events were laid out like this, for example (and I'm very much using Java as a basis here - I'm aware that most objects are based on C++, so it would make sense to have a similar syntax to that):

EVENT Start_of_Frame {



Ini.setGroupItemValue("Crystals", "Red", "999");
//Hundreds more setting of groups and items here
// .
// .
// .


EVENT Collision("Player", "Enemy") {

Player.flash("2000"); //2000 would be the period in ms for which to flash.


EVENT End_Of_Frame {



And so on, and so on. It looks rather confusing at first if you haven't seen that type of code before (and obviously the code would have to be thought out better - flash and setVisibility should somehow be combined), but it could easily be translatable by the program in to Event Editor format depending on preference - the event and action structure is the same. The advantage of laying it out like this is that you don't have to scroll the screen around and hover the mouse over check boxes to discover what you're doing to objects on events - particularly on events that involve a lot of objects on the level.

Other advantages are that you can easily find and replace conditions, define constants so that large amounts of code can be tweaked easily, or write blocks of actions for common tasks that can be called by any object (though I can't think of how to integrate those with the event editor as it is now). Multiple events could be encased in groups.

I only have limited knowledge of Jamagic, but I think that this would keep the basic MMF interface while making it more powerful and readable (coloured highlighting might help). MMF's Event structure is closer to lower level object oriented languages than I first thought.

Just a thought, anyway.

Image Edited by the Author. - Games, music, living in America


Klik Legend

19th May, 2005 at 12:53:06 -

MMF is not, and was never meant to be, a script based program.

I've always typed out events like this:

Collision between Player and Enemy
Player: Set animation to "Hurt"
Player: Set Y velocity to -400
Player: Flash for 2000ms

This is pretty much how it looks in the Event List Editor so it makes sense.
It was suggested for MMF2 that it can export a text version of the events like this which would be good for examples and explanations.

When I made the CFISI object I was aiming for it to be able to run scripts like yours, ideally objects like INI would be integrated so you could do stuff like that, but it never was that good.

- Tigerworks

Post Reply



Worth A Click