linkman2004's Forum Posts

  • The bullet object needs to use the physics behavior, not so much for the planet. You'll apply the force using the "Apply force" or some such action of the bullet object.

    Blending the use of the bullet and physics behaviors will yield nothing but pain. Custom movement would likely be relatively simple, though I wouldn't know how simple in comparison to just using the physics behavior.

  • Have you tried checking the Count property of the objects you're destroying? If, say, you have an object called Object1, you could use "Compare two values" under the system object to check if Object1.count is equal to 0, meaning there are no more instances of Object1 left.

    Ideally, though, it would be better if you provide a CAPX so that someone can look at what's going on. If you don't want to share your game code, you can strip your CAPX down to only parts that you're needing help with.

  • You'll likely want to use the physics behavior. Set the physics world gravity to 0 and apply a constant force on your bullets toward the middle of your planet. After that, it's merely a matter of tweaking the bullets' tangential velocities relative to the planet to get them to orbit.

  • It means exactly what it says. Going back to physics real quick, you have x, which is position; v, the first derivative of x, which is velocity; and a, the first derivative of v, which is acceleration. v, measured in units per second, is the amount of units added to x every second. Similarly, a, measured in units per second per second or units per second squared, is the amount of units added to v every second. A higher value for a, acceleration, will result in greater changes to velocity over a second.

    Hopefully that explains it clearly enough. Let me know if you need more explanation.

  • Export your images from your image editing program of choice as PNG files, then look to the beginner tutorial or the manual page on the image/animation editor for info on getting your files into Construct.

  • Two ways I can think of:

    1. Have a small, invisible sprite constantly positioned to the spear's "Impact" image point and check for collisions with that instead of the spear itself.

    2. Use the System object's "Pick overlapping point" condition to pick all monster objects for whom a spear object's image point is overlapping them.

  • You could try increasing the force you apply to the ball when the player collides with it - I found applying a force of 200 made the ball travel significantly faster.

  • This looks to be related to the design of Else where it doesn't pick any objects, per the manual entry under Special conditions. Putting your code in a For each loop over the Text object - as a sub-event to the mouse click event - looks to give you the result you're looking for.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • silkc2 - Here's an example with milliseconds(and hundredths of a second). This example works differently from Ugotsta's, but I've tried to comment it well to illustrate what's going on.

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

  • Are you ever destroying the bomb sprite? If you don't destroy the bomb sprite, then it could be covering the enemy spawn points and they will be destroyed as soon as they spawn.

    Other than that, I can't think of any solutions unless I can see what you're doing. I'd suggest posting a CAPX - simplified, if possible - so we can get a better idea of what's going on.

  • You're going to have to explain in more detail what you're attempting to do here. Are you just trying to confine this object to an area? Is there a reason your detection areas are so small? The way you're doing it, it's natural that on some frames -- depending on timedelta or where the object is in relation to the detection areas -- your object will move far enough to jump over the detection areas, or even miss them entirely because they weren't in the object's path. It shouldn't matter which behavior you use, your results will likely be the same.

  • The random function definitely isn't the issue here, which means event 111 never runs. Your problem stems from event 112 where you're calling the function again but not returning anything afterward. Just because your inner function returns a value does not mean that the calling function inherits that return value.

    To fix this, instead of calling your function again in event 112, simply set the return value to Function.Call("SpawnLetter") which will call and retrieve the return value from your function.

  • When generating your random position, generate random numbers between 0 and the height or width of your level in tiles, then multiply that value by the width/height of your tiles. For example:

    Create object A at floor(random(Width in tiles)) * TileWidth, floor(random(Height in tiles)) * TileHeight

    Assuming your object's hotspot is in a corner of your image(the size being a multiple of your tile size), then your object will be placed properly aligned to the grid.

  • I misunderstood what you wanted originally, I believe. Here's an example demonstrating what I think you want:

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

  • You do not have permission to view this post