Mipey's Recent Forum Activity

  • Make a variable, old_x

    + old_x is greater than sprite.x

    change animation to "left"

    + old_x is less than sprite.x

    change animation to "right"

    + always

    set old_x to sprite.x

    Guess what this does!

  • If you do invert conditions as an alternative, remember that changes in the preceding event with non-inverted condition CAN influence the one after it.

    If you want to do switching, you may have to be creative...

  • I haven't looked at the cap, but I've got a few tips...

    If you want enemies to fire only when on-screen, just add a condition "Is On Screen", I believe sprites have that.

    Then add another event that checks when the sprite is out of visible area (Negated On Screen), trigger once, set the 'ammo' to 2. So, whenever it flies onto screen, it would fire two bullets, then as soon as it flies out, it would refresh ammunition.

    For random firing, try for every 1000+random(2000) ms. That will randomize it a bit between one and three seconds. Fire a bullet, substract by one, stop firing when it hits 0 ammo.

    As for pacing, you want it to face directly north? Then just set angle to 270 (360-90). If you want it to face the player, then use Set Angle Toward (player sprite) - or use angle(enemy.x,enemy.y,player.x,player.y) expression. However, if you don't want the enemy to change angle and wander off its path, you can just change the bullet spawn angle instead. The sprite won't rotate, but the fire will fire into given angle.

  • [quote:34fgei33]Qarp(a, b, c, x)

    Quadratic interpolation. Returns lerp(lerp(a, b, x), lerp(b, c, x), x)

    In your case, you want to extrapolate both X and Y position, where 'a' is the starting position, 'b' the player's predicted location and finally 'c' the ending position.

    'x' would be time it takes to complete the move. At 0 it will be at starting point and at 1 it will be at ending point.

    So...

    +Is Diving = 1
     > Set Boss.X to qarp(starting_x,target_x, ending_x,dive_time)
     > Set Boss.Y to qarp(starting_y,target_y, ending_y,dive_time)
     > Add TimeDelta to dive_time
    +dive_time is equal to or greater than 1
     > Set Diving to 0
     > Set dive_time to 0[/code:34fgei33]
    
    Something like that. Experiment with it!
  • If it is single screen game, just add sprites that cover edges of the screen (outside view, if you want), then in the movement code check for collision with the player only.

    Alternatively, you can alter movement to only be able to move within limits ( 0<x<DisplayWidth, 0<y<DisplayHeight) for the player only.

  • I think it is the corner coordinates.

    If you have one pixel texture, 0,0 would be top left corner and 1,1 would be bottom right.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Typically one shouldn't leave things the way they are, if we don't intend them to stay that way. If you want to restart the layout as it was originally, then I'd suggest re-generating it using events (set sprites, objects and stuff to original settings, such as position, recreate if needed etc.). Yeah, would be nice to have a tickbox for layout whether to have it remember final state or forget everything and go fresh next time.

    However, global objects and variables would still carry over. Don't leave everything to Construct runtime and control everything by yourself.

    Nothing wrong with being a control freak

  • Awesome work! So far I haven't noted any faults. Looking forward to further additions, such as radio buttons

  • You have it set on Particle Stopped, so it will only be destroyed when the particle speed is reduced to zero. Set it to timeout and it'll be destroyed after 200 ms, no matter what.

  • Thank you for your answers, Ashley. I was merely exploring my options and I appreciate your input on this topic.

  • I ain't no programmer and IndieLib is a C++ library.

  • For the record, it is not like I am demanding this feature, I was just wondering if it was feasible. Of course I can live without it, but hey, if this was possible, it would certainly expand game developer's options!

    What about shaders? Would it be possible to draw primitives based on given parameters? Grab an empty sprite, assign the effect to it and set some parameters. Not the most elegant way, but hey... imagine drawing with shaders. Hella slow, I bet.

    I would use canvas, but it is restrictive in many ways.

Mipey's avatar

Mipey

Member since 16 Jan, 2009

None one is following Mipey yet!

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies