DoomEyes's Forum Posts

  • Thank you, Fireche, for the code, and thank you, korbaach, for the capx file. The file worked exactly as I wanted. Is there an advantage to loading the array data from a JSON string?

  • I am trying to create a baseball simulator. One part of it is the roster of players, which I have put into an array. In my capx file, I have two teams with one chosen at random. How can I loop through the array and display the player's uniform number and name who is up to bat? I created a button that once clicked shows 3 outs, indicating the next player's number/name should show up. Thank you for your help!

    loop-thru-array.capx

  • Thank you all for your help. I appreciate your time. I will play around with all of these and see which works best for what I am trying to do.

  • If two square objects are touching corners, they are considered colliding. I don't want that.

    [attachment=1:3bfsssw8][/attachment:3bfsssw8]

    I only want them to be considered colliding, if they are side by side.

    [attachment=0:3bfsssw8][/attachment:3bfsssw8]

    How do I do that? Thank you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, see if this helps.

    Hi, codah. Your example worked perfectly. I didn't know how to make an array like this. Thank you for taking the time to do this.

  • I am close, I think, but I just can't figure this out.

    I have four of the same "ColorBar" objects on the screen. This object has four animation frames.

    I want each "ColorBar" object to show a different animation frame.

    Thank you!

    My incorrect code:

    [attachment=0:xdr2eqqa][/attachment:xdr2eqqa]

  • The 'is overlapping' is still running every tick (by necessity) , whereas an 'on collision' is triggered. What you should try to do is minimize what is done every tick, which is what my second capx tries to do. Always remember all non triggered events on your event sheet are run every tick.. and try to minimize them.

    Thank you very much for all of your help.

  • >

    > > You could do it as simply as this:

    > > [attachment=0:2af756px][/attachment:2af756px]

    > >

    > >

    >

    > Thank you! This one worked exactly how I wanted.

    > I appreciate everyone's help here!

    >

    Based on Lordshiva1948 's hard work

    edit: but I would still investigate ways of not having this do work every tick..

    Thank you for the advice. How can I tell between the two examples you gave that one is running every tick and the other one isn't?

  • You could do it as simply as this:

    [attachment=0:2f3o1ndr][/attachment:2f3o1ndr]

    Thank you! This one worked exactly how I wanted.

    I appreciate everyone's help here!

  • This is one way to do it.

    Thanks for trying, but it's still not exactly what I want. If you don't have time for this, I understand, but the screens I pasted below are what I am trying to do. Thank you.

    [attachment=0:3uwcdgri][/attachment:3uwcdgri]

    [attachment=1:3uwcdgri][/attachment:3uwcdgri]

  • DoomEyes could be like this

    Thank you for taking the time to do these demos. They are both partially correct. When the Bug object is not colliding with the wall, the points should reset to 0. That's the part I am having trouble with. Do you know how to do that? Thank you.

  • If you could provide capx I might be able to help you

    Here's a simple capx file.

    All I want is when you move the Bug object (move it with arrow keys) over the Wall object, the Points are 100. When you move it off the wall, the Points go back to 0.

    Thank you for your time and help!

    [attachment=0:3qa07kon][/attachment:3qa07kon]

  • Thank you for your help. I tried your suggestions along with many other things, but it's still not working exactly how I want it.

    The points are being displayed, but they are cumulative, and I don't want that. For example, if there are three collisions on the screen, the points should be 300, and then later if there are two collisions on the screen, the points should be 200, not 500, which is what is happening now.

    How do I make my points not cumulative?

    [attachment=0:190uuof0][/attachment:190uuof0]

  • There are many "Bug" objects on the screen at the same time. When one of the "Bug" objects overlaps one of the "Wall" objects, 100 points should be added to the Points display in real-time. However, in my code, it continuously adds 100 points instead of just one time. I tried using a Trigger Once condition (see the second code). Thank you for your help!

    This code continuously adds 100 points:

    [attachment=1:2np5206s][/attachment:2np5206s]

    This code adds 100 points on the first overlap, but then continuously adds 100 points on other overlaps:

    [attachment=0:2np5206s][/attachment:2np5206s]

  • Thank you Aphoridite and blackhornet for your help. And thank you, Lordshiva, for your code example. This helped me understand a lot, and this part of my game is working properly now.