[Request] Count Number Specifc Objects -- MTG Game

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 Real Programmers.

    I'm programming a Magic The Gathering Solitaire (but you play agains the CPU also) sort of game and i really need a help for an extension so i can improve the A.I. and create some cards impossible by now.

    I need an extension to count the number of objects that met some conditions. for example:

    the number of objects that:
    +Qualifier "32"
    +Alterable value a=1

    !!! It must support qualifiers.

    I Think is not that complicated:(

    Here are some previews in first hand...
    It already support more than 500 cards.

    Please login to see this picture.
    Please login to see this link.

    Please login to see this picture.
    Please login to see this link.

    Please login to see this picture.
    Please login to see this link.

    Please login to see this picture.
    Please login to see this link.

    Please login to see this picture.
    Please login to see this link.

    Please login to see this picture.
    Please login to see this link.

    Please login to see this picture.
    Please login to see this link.

    THX for everyone that can help me.

    A special THX is reserved in my program for the one who help me with that:)

  • Hello.
    That game looks really good :)
    Anyway, why'd you need qualifiers? You could use flags, and one qualifier for all card objects, couldn't you?
    To select objects via alterables, try Please login to see this link.

    I have started programming something that could be of interest though... months ago. You were able to enumerate all objects in their frame, get their names, qualifiers, etc.., and you were even able to modify their positions etc., selected by either an object dialogue, or a fixed value. I sounds like the object had a lot of features, but it didn't. If you wish, I could continue working on it. It's really easy.

    Looki

    Please login to see this link.

  • Hi Looki!

    I already use "Select object" in my game, although the creator don't have time to end it and there are still options that are still missing.

    For now the problem is not the selection but the counting.

    All cards have "Qualifier 24",creatures have also "qualifier 32", islands "25" and so on...

    What i need is an extention that tells MMF2 for example how many islands are in play (Qualifier 25).

    Any extention that could help improve this game will be very wellcome. If you wanna end your extention you'll be wellcome.

    I've asked the creator of "Select object" if someone really wants to end it he doesn't mind to give the source code. If someone wnts to look at this code also...

    THX.

  • hmm, why not spread a value over the ones that you have selected then run a loop to unspread the values till there is none left.

    Eg:

    'Value A(card)' = 3
    --Spread value 'Value b(card)'
    --start loop CountVA for count number of 'card' loops


    loop CountVA
    +'Value b(card)' = loopstep count
    --Global value Counter = Global value Counter = 1
    --'Value b(card)' = 0

    then you should be able to figure out how many object that meet the conditions you set are.

    Sorry, a bit tired, and I didn't test this, but it should work.

  • Uh, you can retrieve how many objects of a certain type (or qualifier) there are without an extension or crazy code.

    It's only if you need "The number of this qualifier that match the conditions" that you have trouble.

    Did I misunderstand what you wanted?

    Please login to see this picture.

  • Hello.

    Imagine i need to know how many goblin creatures in play have power equal to 2, for example.

    +Alterable String C (Qualifier 32)=play (this will select all creatures in play, because all creatures cards have the qualifier 32)
    +Alterable value F (qualifier 32)=15 (15 is the specific race code for goblins)
    +Alterable value C (qualifier 32)=2 (that's the one for power)

    I think this will select The Goblin creatures in play with power 2.

    What i need now, is an extension to count and retrieve the number of this selected creatures so i can put it in a alterable value for example.

    I hope i made myself clear, because I'm sort of a rookie:)

    THX

  • The "Compare to number of selected" condition does support qualifiers btw, it was just that adding an expression to get the value was hard, because you can't use a qualifier as an expression parameter. Sure, you can retrieve data from a qualifier, but there is no unique id you can get.
    I would need to store which qualifier you were after somehow, but even a "store" action wouldn't give me it directly, like a condition does.

    Please login to see this picture.

  • here, is this what you are looking for?

    Please login to see this link.

    I just through it together. However it does count the number of objects that meet certain conditions. Those conditions can be whatever you want, as can the objects. If my commenting isn't good enough feel free to ask.

    I should note that while I didn't use Qualifiers in the example, I just checked and they do work, with no problems so you don't have to worry about that.

Participate now!

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