Changing Qualifiers: Most Popular Workaround?

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.
  • Hi all,

    I've been a longtime clickteam user, ever since the original click and play. I'm currently using MMF2 to develop a maze game with some AI programming - the idea being to make a game in 48 hours, so any quick help really appreciated!

    I understand that the inability to change qualifiers / behaviours during runtime is a major gripe - apologies if I'm going over old ground here.

    I just wanted to know what the most effective workaround for this problem is?

    Some background on the game and my requirements:
    I have NPCs running around the maze, and the player's able to ally, attack or ignore them, meaning they need three different states: friendly, neutral or enemy. Obviously the ideal is just to change the qualifier.

    The workaround I'm currently playing with seems the most obvious: have three different versions of each NPC, and simply destroy the neutral one and replace it with a friendly / enemy version once the player has interacted with them.

    The serious issue I have with this is that I have over 20 NPCs, which means over 60 different versions of what is ostensibly the same object with a different name and dialogues. What this means is that once I've completed the programming and start producing the content (ie the dialogues) I'll be tied to my programming: any small change I want to make to behaviours will have to be made 60 times.

    One solution I considered was if I were able to create an object by calling its name from the expression editor then all the AI behaviour could be done using qualifiers. Essentially when a neutral NPC (say 'Tim') has to turn hostile he would be destroyed and create 'Tim Hostile' object. Sadly because Time Hostile has no direct relationship with Tim, this function has to be called in the Tim behaviour, rather than in the qualifier behaviour. If I could tell the qualififer to create '[Qualifier name] + "Hostile"' then I'd only need the one line of code in the event editor, rather than the same line copied to every single NPC with their relevent hostile version.

    Of course, as far as I can see, I can't do that!

    I'm really hoping there's a pro tip you guys can give me that might help me out.

    Thanks in advance!

    Tom

  • Hi TJ,

    Have you considered using your NPC's Alterable String?

    For example, rename Alterable String A to read Status, just to make it more easily readible.

    Then in the event editor have conditions like.

    If NPC status = "Friendly" then do this
    If NPC status = "Enemy" then do this

    You can easily change the status in game also by using events like:

    If player collides with NPC then change NPC status to "Friendly"

    Of course you can add multiple lines to your conditions, the above mentioned method is just the key to seperating the different types of NPCs and creating different behaviours.

    Hope this points you in the right direction!

  • Story of my life ;)

    While I'm here, a little shameless self-promotion: if dynamic / story driven games are your thing, check out my Please login to see this link..

    Tom Jubert
    Narrative Designer
    Penumbra, Lost Horizon, Driver: San Francisco

  • Hi TJ,

    i fully understand you. There are so many options in MMF2(dev) that its sometimes realy difficult to find the "best, easiest, cleanest" way to do something in such a powerful environment.
    This is also true with extensions. I hope Clickteam will surprise us in the near future with a clean solution to always be up-to-date with newest extensions.
    Anyway, nice that BaconUK could point you in the right direction The Clickteam-Forum is one of the nicest Forums on the Planet, realy nice and helpful people here.

    Greets

    jahkri

  • Hey guys,

    An other quick question. I'm using workarounds for the absence of an "It is X time since condition Y was met" condition.

    Currently when condition Y is met I'm just setting Alterable Value A to the time delay I want in seconds.

    I have an "Every 1 seconds subtract 1 from Alterable Value A" condition.

    Finally I have an "Is Alterable Value A = 0" condition.

    Is there a better workaround than this?

    Thanks,

    Tom

  • The TimeX object lets you fire delayed events. You can download it as part of the z33z Extension Pack on the right sidebar ------------->
    RickyRombo's Please login to see this link. can be helpful.
    ;)

    Working as fast as I can on Fusion 3

  • My sin is to make things more complicated, I alread did pages of programing where I just needed one line.

    Anyway, I solve all my problems with alterable values and I can't work diferently, I don't even use qualifiers, I just set all "behaviors" in the main editor, even if it gets messy xD

  • Most important thing is if it works. It's always good to learn better ways to do things for future reference, but in the meantime, if you come up with any solution that is the important part.

Participate now!

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