linkman2004's Recent Forum Activity

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

  • 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

  • Change "Set angle" in the bullet behavior properties to "No".

  • You do not have permission to view this post

  • Refer again to my previous post. ScrollX and ScrollY are used if your layout is bigger than your screen and you want to show different parts of said layout. If you just want an infinitely scrolling background, then there are a couple basic ways that could go:

    1. Your background is a single tileable image that is at least as large as the screen in the direction you want to scroll. In this case, you have two instances of this background right next to each other in the direction of the scroll which wrap(by repositioning) to the opposite side of the screen when they're no longer visible. You need two instances for the case where one of the images is only halfway on the screen, so the other one is there to show the part of the image that's off the screen on the first instance. You manipulate the position of these images to simulate scrolling.

    2. Your background is composed of small, distinct elements. In this case, you need enough elements only to fill the screen size, manipulate their position to simulate scrolling, then when they go off the screen, you wrapping(again, by repositioning) them to the opposite side of the screen.

    I'm going to stress again, the only time you'll set the scroll values is when your layout is bigger than your screen size. If you have an infinitely scrolling background, this will have to be simulated by repositioning the background elements.

    If you describe what you're wanting to do in more detail, it will be much easier for me to give a proper explanation. Detail would include whether or not your levels are static or procedurally generated and whether or not you want an infinitely scrolling background.

linkman2004's avatar

linkman2004

Member since 15 Jan, 2008

Twitter
linkman2004 has 1 followers

Trophy Case

  • 16-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

18/44
How to earn trophies