Can you store gameplay mechanics globally?

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.
  • I do things strange and then find or learn better ways to do them later so before I get too far ahead of myself in the development process and find I have to make a large amount of changes;

    Lets say I have a game play mechanic that repeats throughout the entire game; Can I store that globally and then call on it on demand within each level (frame) ?

    here's an example;
    Pretend I'm making super mario bros;

    If player1 collision active object 'mushroom' then player1's health is set to 2 and sprite size increased by 25%

    Rather than having that as an event in every single level it might occur in, can it be stored in he global events?
    If so Is there an effective way of calling on it or would that be more complicated than just storing that event in each frame?

    I hope I make at least some small measure of sense.

  • You can try to use Global Events.

    Or an efficient way to do it is use one frame only for your game stage.
    That's right, rather than using single frame for single level, use one frame only for all levels.
    For that you have to build your own custom level editor rather than using Fusion's editor.

    Snail has great one hour tutorial video showing you how to make your own level editor:
    Please login to see this link.

    <span style="font-weight: bold">My MMF2 Application:</span>
    Please login to see this link. - Windows XP Tweaking Tool
    Please login to see this link. - FLV/MP4 Player Example made by MMF2

  • One of the principles of Object Oriented scripting is the ability to store related properties and functionalities 'within' the object itself. The same way that Alterable Values and Alterable Strings can be pre-defined in an object when instantiated, so can events. You can manage the object centric events within Behaviors.

    So for instance, you can have Mario, with a 'health', a 'healthMax', and movement and collision events.
    You can then have multiple enemy objects with different 'hurtAmount' values, and use an enemy qualifier on all the enemy objects. You can also have healing objects with a -1 'hurtAmount' assigned to a healing qualifier.

    When that is set up, within the Mario behaviors, you can test collision with the generic enemy and healing qualifier groups. If they all share the same Alterable Value index locations for the hurtAmount you can subtract the colliding object's hurtAmount from Marios health value without having to specifically script each collision, and without having to copy and paste it everywhere.

    This is a pretty important feature of the engine that's worth looking into, but it does have it's issues in this sense. The bummer is even though you can define behaviors and copy the objects, there is now way that I am aware of to make the changes to the objects behaviors in one frame 'push' to the same object in all the other frames. There are global values and events, but I don't know of any global 'objects' in the sense of a defined instance you can change universally.

    Anyone have any globalized object techniques?

  • You can try to use Global Events.

    Or an efficient way to do it is use one frame only for your game stage.
    That's right, rather than using single frame for single level, use one frame only for all levels.
    For that you have to build your own custom level editor rather than using Fusion's editor.

    Snail has great one hour tutorial video showing you how to make your own level editor:
    Please login to see this link.

    Even if I don't end up using this, it's very interesting. Thank you.

  • You're welcome, Alpha17x. Although I'm still curious about this, hence why I bumped this thread.

    I wonder how big Fusion game titles manage to handle this global events as I've noticed not all of them seems to use custom level editor.
    BossRighteous was right, even though you can manage to make a 'behavior' to objects but to make them global it's still a problem.

    Or you can to put all game mechanics event in each frame, but when you need to change the mechanic then that means you have to scour all frames manually which seems to be pretty bothersome.

    I would like to hear from anyone who has developed a full game before on how they can manage their game mechanic events.

    <span style="font-weight: bold">My MMF2 Application:</span>
    Please login to see this link. - Windows XP Tweaking Tool
    Please login to see this link. - FLV/MP4 Player Example made by MMF2

Participate now!

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