fedca's Recent Forum Activity

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

  • alextro Thanks for your help!

    I checked your example, but I want to check if the player is overlapping the bounding box of the tileset even if there is no tile at the position of overlap.

    So checking for bbox left, right, top, bottom works that's not the problem.

    It just felt like I was missing a "is overlapping bbox condition" and was writing an unnecessary amount of events, visually cluttering the event sheet.

    but I think with the help of rojohound I found a tidier way to check for overlap of bounding boxes

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • just if a point is overlapping the bounding box...

    oh interesting yea I'm currently using 4 compares, that would definitly makes it a bit cleaner!

    I didn't even know you could do compares like that.

    then I could even do one compare like:

    (sprite.bboxright>tilemap.bboxleft)+(sprite.bboxleft<tilemap.bboxright)+(sprite.bboxbottom>tilemap.bboxtop)+(sprite.bboxtop<tilemap.bboxbottom) = 4

    thanks alot, at least it looks cleaner in the event view :D

  • sure, but then I would still need to store the correct tiles in an array, or add double the amoun of tiles to have a collision-less version for each tile.

    So RadioMars suggestion would probably be better than.

    Thank you nontheless!

fedca's avatar

fedca

Member since 6 Jul, 2017

Twitter
fedca has 65 followers

Connect with fedca