R0J0hound's Recent Forum Activity

  • I think it's a unique id of sorts, best I can tell it's used by C2 only when loading the capx. I was making an event sheet generator one time and just used consecutive numbers. I don't recall if anything amiss happened if they where omitted.

  • Your picking is good, it's just your equation and algorithm is off.

    First your qarp expression in event 10 is off. For the last parameter you're using timebetweennode/time which I believe should be flipped to time/timebetweennodes. Also I'd like to point out that expressions like Sprite(1).X will use the x of the sprite with the iid of 1 not the uid of 1, but in the case of your capx they happen to be identical.

    Fixing that you'll notice the path isn't smooth. Well it is until it hits the next node at which point the object jumps. You'll need to rework it.

  • It doesn't vibrate for me. In the capx I subtracted 1 from the repeat loop to stop jitter when the mouse isn't moving.

    repeat distance(cursor.x, cursor.y, mouse.x, mouse.y)-1 times

    Maybe that can help? Maybe use 2 instead?

  • To stop the cursor from clipping through walls you need to use a loop to check all positions between the old mouse position to the new position for a collision.

    like this or the attached capx:

    repeat distance(cursor.x, cursor.y, mouse.x, mouse.y) times

    ---- cursor: move 1 pixel at angle angle(cursor.x, cursor.y, mouse.x, mouse.y)

    -------- system: pick wall overlapping cursor.x, cursor.y

    -------------- cursor: move -1 pixel at angle angle(cursor.x, cursor.y, mouse.x, mouse.y)

    -------------- stop loop

    There are other ways such as doing a raycast from the old mouse position to a new one but c2 has nothing built-in for that. You could also do wall sliding for a more pleasing motion instead of getting stuck on walls, but again there's nothing built in to handle that.

  • Instead of setting the cells to just animation frames you'll need a value for empty cells, so you know whether or not to create a tile there. 0 is the best value for that since 0 is the default cell value and cells outside the array are always zero. You could store the animationFrame+1 so 0 would be empty and then you could set the animation frame to array.at(x,y)-1 so 0 in the array would be frame 0.

  • It was intentional to have all the instances share the same image. So say you have 100 instances then they would all share the same image. The issue of having a different image per image for tilesets is the image would be duplicated needlessly and consume memory.

    A better solution would be to have multiple textures in the type (like animations) so you could just specify which spritesheet per instance. That way the texture wouldn't be duplicated needlessly.

    No ETA on making such a change though.

  • Well to check if a certain tile at say x,y has air above it you can do this:

    Array at (x,y-1) = 0

    So to do it for everything do this:

    Array: for each xy

    Array current value >0

    --- create tile

    ------- Array at curx,cury-1 = 0

    ------------ make tile grass covered

  • You can do that with an equation

    Every tick

    ---sprite: set scale to lerp(0.2, 1, sprite.y/480)

    That will set the scale to 0.2 if y is 0 and set the scale to 1 if y is 480. All other y positions will set the scale smoothly from the y position. You can play with the numbers until you get the look you want.

  • Re-work your events like this to pick all the top blocks with health 0.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What shape is the environment?

    If it's just square you could do this:

    Could you make the player's collision poly round and bounce the balls off the player? The bounce off object action may work well enough for that to get the ball out of the horizontal path.

  • You possibly can get better results by doing something like this if you only have vertical and horizontal walls:

    Corners are a bit odd with the ball, but square against square should work well.

  • Since you're using a while loop I'd guess you have an infinite loop somehow.

    One thing I notice is if 9 is ever needed it won't work since

    floor(random(1,9)) will only give values from 1 to 8

    Why?

    random(n) will only give values from 0 up to but not including n.

    Instead you should do floor(random(1,10)) if you want 9 included.