klabundee's Forum Posts

  • > I would suggest having a column on the array to store if the question could repeat or not. This way you can control which question could repeat.

    >

    > Just store 0 and 1 on a new column, and when this question apper on screen, compare if this column is = 0 if yes, remove this question from array, if 1 just keep it for next random.

    klabundee can u show me an example of it, please?

    Yes. In the same example as I sent before, I just added a new column, and it stores 1 and 0. When it call for a question, if the column value = 0 it will remove the question/answers from the array.

    Here:

    mega.nz/file/98ABQKKZ

  • True but following your screenshot you still are setting the Hovered variable to true/false and calling the function every frame.

    I think that you need to compare LastHoveredValue here, not inside the function.

  • I see.

    I don't think that you need 2 booleans to compare, or maybe I'm not understanding it correct.

    If you remove "LastHoveredValue", doesn't it work same way?

  • yes but, cant you just set the action on Cursor is over?

  • So this is my setup:

    If I were doing this in javascript, i'd have a condition after those two like so:

    > if (this.Hovered != this.LastHovered) {
    // Do Stuff
    }
    

    How would I replicate this comparison as a condition?

    I thought it was an instance variable. Try condition: System -> is boolean set

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm new to Construct 3, but are you suggesting that construct doesn't support comparing one value against another?

    No, Im saying that C3 probably not allow to compare a value (string, text, number) to a boolean (flag).

    And that C3 has a condition to compare if the boolean variable flag are true or false.

  • I don't think that is possible to do that.

    As boolean just store true or false I think that you just need to create an condition on your object: is boolean instance variable set? for both, if both are set it means that both have the same value.

  • I see, you need to increase the left tilemap size on runtime..

    As is not possible to set the origin image point of the tilemap I don't have an answer..

  • So, I can easily increase the width of my tilemap by setting its width to tilemap.width+100, but this only increases its width on the right side. I need to increase its width on the left side. Is there any way to do this?

    Thanks.

    Im not sure if it solves your problem but at the same time that you use tilemap.width+100 you can set tilemap.X-100

  • I would suggest having a column on the array to store if the question could repeat or not. This way you can control which question could repeat.

    Just store 0 and 1 on a new column, and when this question apper on screen, compare if this column is = 0 if yes, remove this question from array, if 1 just keep it for next random.

  • Are you using a static page on your website or a CMS?

  • When uploading a new game or updating, just use a different name from the preview one.

    You can even use filename?v1 filename?v2

    Not using cache is not a good approach in your case.

  • Dear klabundee and oosyrag,

    Yes, the answer always going to be yes and no. When I save my array as you said, what should I do next?

    Thank u both for answering.

    The way I said is just one way.. its a simple one..

    First, store the index of the array, for example..

    Your current question is 5.0, so you know that the values to consider are on 5.1 5.2 and 5.3 to yes, and 5.4, 5.5 and 5.6 to no.

    On button click yes:

    Set value "Money" to (Self)+(1,index.array)

    Set value "Popularity" to (Self)+(2,index.array)

    Set value "Success" to (Self)+(3,index.array)

    On button click no:

    Set value "Money" to (Self)+(4,index.array)

    Set value "Popularity" to (Self)+(5,index.array)

    Set value "Success" to (Self)+(6,index.array)

    You may also need to compare before set the value to the variable if its negative or positive..

    Here, just made an example:

    mega.nz/file/M1hwwDxR

  • Are the choices always going to be yes and no?

    if yes..

    Just save your array like:

    0,0 There is a pandemic. Will you open hospitals?

    0,1 Amount of money, for yes

    0,2 Amount of popularity, for yes

    0,3 Amount of success, for yes

    0,4 Amount of money, for no

    0,5 Amount of popularity, for no

    0,6 Amount of success, for no

    1.0 Next question..

  • You're welcome, go for it, finish it :)