fedca's Forum Posts

  • if player is on floor and player.platform.vectorX>0 and keyboard press left. Set animation to "skidding" wait 0.5 simulate platform pressing left.

    VectorX gives you the vertical speed of the platformer object. greater than 0 means right, less means left, maybe that helps? with this you even could do skidding only if the VectorX is faster than x.

  • Oh yea you are right, I mixed up which way the layoutScale value zooms in/out!

    glad I could help in some way.

  • how far it zooms out is the third value in the clamp(currentLayoutScale,minLayoutScale,maxLayoutScale)

    set the max value to something lower, like 1 for default for example.

    to reset the camera to the center of the layout when zoomed out you could do something like this:

    if layoutScale = maxLayoutScale set camera postion or scroll to

    x: lerp(self.x,layout.width/2,speedYouWant*dt)

    y: lerp(self.y,layout.height/2,speedYouWant*dt)

  • well, it would work with animations. Load Image from url replaces the current frame in the current animation, so If you have blank frames in placholder animations it would work.

    Defintily could get a bit messy depending on how many and different things you want to laod.

  • You could use an empty dummy object and load images into it on runtime.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • np!

    You could solve the problem by actually having one large layout and just give the feeling of rooms with camera bounds you change on entering each room. Bacause in that case the enemy would never have to be teleported.

    Is there a specific reason you use different Layouts?

  • DiegoM

    sounds great, looking forward too see whats next!

    yea scrubbing is probably mostly useful for in-editor and not that much at runtime.

    I hope music playback in editor is coming soon :)

  • I would use a while loop

    while enemyPosition = lastEnemyPosition

    set enemy position to random(min,max)

  • on layout change set float chaseDistance to distance(player.x,player.y,enemy.x.enemy.y)

    Every seconds if bool enemyNotSpawned = true subtract enemySpeed from chaseDistance

    if chaseDistance < 0 spawn Enemy

    This should work even with layout changes before the enemy spawned again.

    Or do you want to achive something like this:

    layoutA>layoutB>LayoutA Enemy is still in layoutA running to layoutB?

  • you could store the distance the enemy has to the player when changing the layout and delay the spawn of the enemy something like this:

    on start of layout, wait for: storedDistance/enemy.speed seconds

    spawn enemy

    Tbh I am not exactly sure if this works depending on the type of game you are going for.

  • Here you go, there might be a better way to do it, but it works. I had to use the chromakey add-on:

    construct.net/en/make-games/addons/331/chromakey

    let me know if you have any questions!

    c3p File:

    https://drive.google.com/file/d/1A8nDin9NkDpFjvPbTFEMA7g9lnV96Xya/view?usp=sharing

  • I have tried it, and I don't think there is a real difference as Windows-builds still run in Chromium/Edge webview 2, So it's still basically a Browser.

  • If you use constructs build-in save system https://www.construct.net/en/tutorials/savegames-313, there is no need to save to a dictonary or array.

    I would just use instance variables and let construct do the saving.

    With global variables you would need new ones per player and then pick the correct ones in functions. With instance variables you don't have that problem.

  • I would use instance variables on a player-family. Never destroy players, just disable and hide them if they die, etc.

    Secondly you could store the stats in an array or dictonary and load them into the instance variables on re-spawn. Only in case you really really see the need to destroy the player object.

  • yea no real problem there, just felt counter intuitive to have this action missing for tilemaps. As it is available for all(?) other object types that have collisions.

    But there probably is a good reason it's not possible.