KryptoPixel's Recent Forum Activity

  • On suspended -> Store the datetime

    On resumed -> Compare stored datetime to current datetime

  • construct.net/en/make-games/manuals/construct-3/system-reference/system-expressions

    ViewportBottom(layer)

    ViewportLeft(layer)

    ViewportRight(layer)

    ViewportTop(layer)

    Return the viewport boundaries in layout co-ordinates of a given layer. Not all layers have the same viewport if they are parallaxed, scaled or rotated separately.

    ViewportWidth(layer)

    ViewportHeight(layer)

    Return the size of the viewport in layout co-ordinates for a given layer.

    layer is the layer name as you can have many..

  • It depend on the image point of the object to be spawned.

    Create Object

    X: ViewportLeft("layer")-(ViewportWidth("layer")/2)

    Y: ViewportTop("layer")+(ViewportHeight("layer")/2)

  • You probably want to work out a steering/flocking system instead of using physics.

    The most simple one is to use two bullet behaviors on your sprite, and add your sprite to a family.

    The first bullet behavior is a constant speed, 0 acceleration, with angle set towards your target.

    The second bullet behavior is a 0 speed, small acceleration, disabled by default.

    On sprite overlap family, set bullet2 to enabled, and set the angle to angle(family.x,family.y,sprite.x,sprite.y)

    Then on sprite not overlapping family, set bullet2 speed back to 0 and disable.

    You can improve this by adjusting the (repulsion) acceleration based on distance, rather than simply overlapping.

    This just got me.. 2 bullets.. I didnt know that was possible to have 2 bullets behaviors on the same object.. Im gonna try it, thanks!

  • Hey guys, so, my project is room based, each room has colisors (red).

    The enemies are moving using physics, the only way that I found that moves the enemies like vampire survivors, without overlapping them.

    When the player attacks, if he attacks an enemy, the enemy got a knockback effect, where now he move at angle to a specific force*dt like the image.

    The problem is that I could not find a way to prevent enemies from overlapping the room colisors, even changing the move to angle for apply impulse.. Sometimes it works, sometimes the enemy just overlaps and get stuck there..

    Can anyone help me?

    How the Orc knockback works right now:

    Is overlapping attack_colisor -> trigger once -> Orc.Timer.Knockback Start

    Is Orc.Timer.Knockback running -> Set Orc.Physics.velocity = 0, Move Orc at Angle: angle(player.X,player.Y,Self.X,Self.Y) distance: playerKnockbackStrength*dt

  • Getting better

  • DiegoM thanks, will try it.

    Best working and best performing solution I had found for Vampire Survivor like enemy behavior is using phyics.

    Threw together a little example for you:

    https://drive.google.com/file/d/17eszXFnrcgYShboEL64XVV1iuEX70yWj/view?usp=sharing

    Let me know if this works for you! :)

    Wow thats awesome, I have tried using physics but could not manage the hits between enemies. I'm gonna try to implement this way you sent. Thanks!

  • Im doing something similar right now.

    Im using 9 positions(Image points) around the player as move to points, but they are calculating the closeast one to go to, to avoid an enemy trying to go through the player to reach the destiny.

    But as far as I move the player they all will get the same point to move to.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If i'm remember well, ennemis move as Bullet in Vampire Survivors, so it's pretty easy, just use Bullet Behavior, and set the angle to angle of your Hero.

    Better, but they still overlap.

  • Hey guys, Im trying to recreate the vampire survivors enemies movement.. but Im not able to recreate it.

    Using move to.. lerp and so on.. it just overlap the enemies and the player. Even them having solid behavior and colision enabled.

    Tried using path finding but it get really buggy.. Does anyone have any clue?

    Thanks

KryptoPixel's avatar

KryptoPixel

Member since 22 May, 2021

Twitter
KryptoPixel has 2 followers

Connect with KryptoPixel