DoomEyes's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I cannot figure out why my overlapping works when it's not in an OR statement, but if I make an OR statement, it does not work. Thank you for your help.

    Why does this work?

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

    But this does not?

    [attachment=1:1cvs4pmr][/attachment:1cvs4pmr]

    My Z order

    [attachment=0:1cvs4pmr][/attachment:1cvs4pmr]

  • You have 4 created already? Then use for-each, not a for-loop.

    Thank you.

  • You have to Create and place it. This is just moving the one object around.

    It's already created and placed in my layout. I want to randomly place it four times by doing a loop.

  • Sorry for posting such a newbie and simple question, but I've searched and searched, and I just can't find the proper way to format this. All I want to do is place my "bug" object four times on the screen. This places it only once. Thank you.

    [attachment=0:n5uzviwe][/attachment:n5uzviwe]

  • I do it like this, create a global variable call opacityToggle, it holds one of two values, it is either on or off (or maybe 1 or 0). On your grid button give it two frames of animation (set animation speed to 0). Everything then works off the variable. If oppacityToggle is "on" then set the animation frame for the button to on. If oppacityToggle is "off" set the Gridbutton animation frame to 2 (off). Make sure frame one is your On image of the button, and frame 2 is your off animation for the button (I am assuming here that the button is a sprite with the on touch/on click behavior). You then have an event that says if opacityToggle = "On" Set opacity to 100, Else Set opacity to 0 (or whatever it should be.

    Basically you use the variable to track if the opacity is on or off and everything else uses that.

    Thank you for your help. This is a good way to do it with animation.

  • Make an instance boolean variable named "opa" in your "Grid" sprite.

    GridButton on clicked > Toggle "opa"

    Is opa O & Trigger Once > Set Grid opacity to 100

    Is opa X & Trigger Once > Set Grid opacity to 0

    Thank you. That worked for me. I am attaching an image so other users who may need help can see how to code it. My boolean variable is named "Helper."

    [attachment=0:233avn7m][/attachment:233avn7m]

  • I have a Grid sprite with opacity of 0. I have a GridButton that when clicked makes the Grid opacity to 100, thus showing the Grid. My Grid and GridButton do not have any variables.

    How do I make this same button a toggle, so that if it is clicked again, the Grid opacity then goes back to 0? Thank you!

    [attachment=0:11kqna2p][/attachment:11kqna2p]

  • You haven't attached the event sheet to the layout under layout properties. And those events should be under 'on start of layout' or some other event that runs once otherwise you're spawning new blocks continuously.

    Thank you very much!

  • I am trying to recreate the 2-D array with the three colored blocks on this page:

    https://www.scirra.com/tutorials/307/arrays-for-beginners/page-4

    My test is not working. Attached is my capx file. Can someone please tell me what I am doing wrong?

    Thank you!

DoomEyes's avatar

DoomEyes

Member since 8 Aug, 2013

None one is following DoomEyes yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies