Error when comparing AltValN

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.
  • My Alterable Value 6 of a Object ( "Encouter Config") is Kind of Enemy 1 = 0

    When I put
    -if Kind of Enemy 1 = Kind of Enemy 2
    -do a thing

    It is ok.

    But when I put:
    - if AltValN( "Encouter Config", 6 ) = Kind of Enemy 2
    - the line doens't work.

    Why?

    Thanks.

  • sorry, no luck!

    Well, then I'm not completely sure of what you are doing,
    any chance you can upload an .mfa so we can check what's wrong?

    a selection of my Fusion examples can be found Please login to see this link.

  • Comparing 2 general values under special conditions doesn't scope like comparing an alterable value of an object. In other words, there is no specific distinction between instances of objects. If you must use compare 2 general values, you could use a foreach loop to scope them individually.

    Always:
    -> "Encounter Config" object - Count - For each object - "Encounter Config ID"

    "Encounter Config" object - Loops - On each object - "Encounter Config ID"
    + AltValN( "Encouter Config", 6 ) = Kind of Enemy 2
    - do something


    EDIT - I just looked at your mfa and realized you were using an expression, not compare 2 general values. I'm sorry.

    Please login to see this link.

  • Still, it seems to be a bit of a scoping problem.

    Alterable Value A = Alterable Value B (Works)
    AltValN,1 = AltValN,2 (Works)
    Alterable Value B = AltValN,1 (Works)

    BUT

    AltValN,1 = Alterable Value B (Does Not Work)


    In your first post:

    AltValN( "Encouter Config", 6 ) = Kind of Enemy 2

    Try switching the two, maybe?

    I've never really played around with a variable's index, so sorry I'm flying blind here. But on a side note, Schrodinger, you sure they're index 0? In trying to help this problem, that's not the impression I get.

    Please login to see this link.

  • Yeah Ziplock I'm pretty sure,
    try adding a list, setting two alt vals of an object to 1111 and 2222
    and
    >> add line str$(altvaln0)
    >> add line str$(altvaln1)

    you'll get 1111 and 2222

    but global values have index 1, so it's a little tricky XD


    @ Zugwang:

    I guess you were addressing alt.val.n.1
    (you were referencing alt val no. value of alt val n 5)
    instead of alt.val.5

    see example:

    Please login to see this attachment.

    also, in one situation I guess you picked values from enemy instead of config encounter object,
    (this was solution 2, now working here)
    always better make graphics different on different objects to avoid messing X)

    a selection of my Fusion examples can be found Please login to see this link.

  • hey Ziplock,
    I think the confusion here arises from using dynamic indices,
    when hitting "edit" to choose the value to compare
    you are prompted the expression editor
    here you have to input the numerical index of the value you want to compare
    (i.e. if you want value 1, simply write 1, and NOT alt.val.N.1 --- unless your alt.val.n.1 = 1 XD)

    because if you input AltValN("object",1)
    you are not choosing altval no. 1
    but instead Alt val number value of alt val. 1

    so that if, like in your example,
    alt val 1 (>> B) is equal to 3

    in your event line you are selecting alt val no 3 (>> D) (value of alt.val 1)
    and comparing it to alt val no 2 (>> C)
    since both are not valorized (and thus equal to 0)
    comparison returns true,
    but for a different reason then the one at first glance you could guess! XD

    to demonstrate it, simply change value C (or D) in your example,
    comparison won't return true because you are comparing C with D!
    (or make them equal = comparison will return true)

    a selection of my Fusion examples can be found Please login to see this link.

Participate now!

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