dpmontes's Forum Posts

  • The error is probably in the execution of your intent. Post a .capx so we can see your actual code instead of that pseudo.

  • First off, at line "8" you don't need the "every tick" condition in conjunction with the "Is mouse cursor over block2". It will already do that test every tick. It appears that the mouse is able to detect a gap in between the blocks even though it appears that there shouldn't be a gap. If the blocks are made just a little bigger, they overlap and you don't see the momentary "not over".

  • 1. When a layout restarts, set a variable "layoutTime" equal to the time

    2. If you wanna know how long since the layout restarted, take the time - layoutTime

  • 1. Sounds like you need a menu that is one large image for the background and then composed of smaller dynamic sprites. Not sure what you mean that it shouldn't be an image as I'm not really sure of how else you could make a menu. Certainly not a single image could make a good looking menu cause you want buttons to pop out when you roll over them.

    2. I would use the first method of playing the sound but off the top of my head. I try to minimize the number of global variables if I can do it just using the instance of the tank itself.

  • Locusthorde300

    Without seeing your code, I'm assuming the problem is that you are holding down the shoot button and it looks like he is just standing there.

    You see that green arrow next to the Keyboards? That means it's a one shot test. It's gonna test for when the Key is first pressed. Instead of using "On key pressed" use "Key is down".

  • xanxion

    Yes, I read that. So that tells me what your goal is. You still need to reveal what the problem is.

  • Xionor

    I'd need to see a .capx for the text block

  • The problem is that you have the option Pixel Rounding set to ON. This forces your objects to be drawn at integer positions. Turn it OFF so objects can be drawn between pixels. The option is in the Project Settings window above the Window Size option.

  • Xionor

    The problem is that you are stuck in an infinite loop within the WHILE. The way WHILE works is that it will continue to loop as long as its conditions are true. You have two conditions. Player.X is between 500 and 900. So if that is true, the game will continue to stay in the WHILE loop and SCROLL to Player.X. So SCROLLING is your only action. But SCROLLING does nothing to change your Player.X. The game can't get input from outside the loop to see that you are pressing the left button and moving Player.X to less than 500. It's stuck. So the way you want to rewrite that SCROLLING bit would to make it simple IF THEN statements. You'll need to translate it to Construct speak.

    IF Player.X > 500 AND Player.X < 900 THEN

    Scroll to Player.X;

    ELSE

    IF Player.X > 900 THEN

        Scroll to 900;

    ELSE

        Scroll to 500;

    END IF

    END IF

  • It would help me to have more information. You didn't even tell us what the problem was. "Im having a major issue with an "enemy wave" system for a TD game." and "Im really having som problems with this.

    I would LOVE som help, im really stuck at this momment." just do not tell anything meaningful. Post a .capx if you are willing.

  • Aside from all these calculations, I think using an octagonal detection shape will be sufficient, especially if you strategically place the detection shape. The pictures you have show the octagonal shapes fully inside the ellipse. But if you place the octagonal shape on top of the ellipse so it weaves in and out, I think that offers a pretty accurate recreation of the ellipse and the end user would probably not even know the difference.

    <img src="http://imageshack.us/a/img11/3272/19280691.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • BluePhaze

    If I am understanding you correctly, you are saying that when the unit overlaps the rectangle that encompasses the enemy and the enemy's ellipse, you could "just replace the ellipse calculations with the invisible rectangle and do an is overlapping test". That defeats the purpose of the ellipse test because simply testing the rectangle collision would result in a collision range that is based on a rectangle and not on an ellipse!

    You could check to see if the unit is within the largest radius of the ellipse to then start testing whether the unit is in fact touching the actual ellipse. However, there is a trade off. Imagine that you have an ellipse which is 1000 pixels wide and 10 pixels tall. Then your distance method of detection would detect that a unit is "touching" at a distance of 500 pixels above the bad guy even though the unit still has another 495 pixels to go before colliding with the ellipse. The closer that the ellipse is to a perfect circle, the more accurate the first line of detection will be. And the problem with the rectangle is that the corners will always give false positives. So it's a trade off and I can't catagorically say which method is better.

  • bscarl88

    Pretty much that is right. But instead of have the condition if EnemyFamily is hit AND EnemeyType <> "Wolf": -hp, you could just make another family instance variable called HitDamage. Then give each instance its own HitDamage which will determine how much damage they receive. Set the Wolf's to zero if you don't want him to receive any damage.

  • You have a family called ENEMY. There is a wolf, a vampire and an alien that are all enemies. Give the family an instance variable called "Name". Then you can give each instance an appropriate name. So if an ENEMY is hit, you can pass along the NAME of that specific enemy which will determine what kind of enemy. You can call a function and pass the name of the ENEMY as an arguement for that function for the function will know what to do.