ErikSwahn's Forum Posts

  • Ah okay, so using trigger once below other conditions in the event is fine? It's only having a single trigger once function that ruins it? If so it should not be so much to change.

  • Seems there is no real solution other than rework the code, in some places im not sure how to do it since ”on created” also seems to trigger again. Is there a better way to save a game? What about json?

  • I see, thanks for the reply!

  • When I load my "mysave" save, events seem to re-trigger... How do I make sure this wont happen? I tried using the persist function for all my objects but it did not help. Might it be that events like "trigger once" and such is the problem? I just want to return to a state simply put. I use the constructs very own "save" and "load" action.

    Tagged:

  • Thank you so much! That was exactly what I wanted :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I see. How would you build such function? Would you check if an instance variable is greater than 0? If so, how can I display only such variable in a text?

  • I have a textbox that follows the cursor and when I hover over an item sprite with some instance variables I want it to display these. It does work but I also want to exclude any variables that is 0 or less. So if an item has 3 damage and 0 lifesteal it should only display the damage text.

    How my action looks like

    iteminfo Set text to

    itemtemplate.name&

    "Health="&itemtemplate.health&

    "Armor="&itemtemplate.armor&

    "Damage="&itemtemplate.damage&

    "Regeneration="&itemtemplate.reg&

    "Thorns="&itemtemplate.thorns&

    "Lifesteal="&itemtemplate.lifesteal&

    "Value="&itemtemplate.value

  • Local storage function was what I needed. Thanks! :D

  • I want to make selectable save file slots, I already made the menu with the icons, now I just need some way to store data.

    I want my game to have Super Metroid's or Castlevania SOTN's file select screen where you see which ones been played on and which ones are empty.

    How can I load that kind of info into the game? I suppose the save/load system isn't the correct method.

    Tagged:

  • I have a few layers, each having an image placed on it. The images are on top of each other.

    Here is the problem: I want to make an image visible through one of the images in some layers above. The image on "layer 10" and "layer 11" has to be visible through the image on "layer 14" even if that image is above them both in layer order. I have quite a few layers that must stay in place covering the other images below so I wish not to change their order.

    Any suggestions is much appreciated!

  • Sir, I believe you need to use families. I just recently learned how through the construct 2 example "families"

    In that example you will see that there is only one sprite for the bullet, with the use of families every bullet will share the same conditions but act individually, this should point you in the right direction.

    Many thanks!

  • I am trying to have npcs show their own dialogue box when they see the player using "line of sight". So I put out the sprite called "bubble" which is the text box where the text is to be displayed onto a certain npc. Then if the "bubble" is overlapping the npc it will also have it's position set to that specific npc. However, that's where the problem occurs. If there are more than one npc per layout and each one of them have their own "bubble", the "bubbles" won't set their each position to their npc. Instead of that, all "bubbles" are set to just one of the npcs around, giving one of the npcs all of the other np's "bubbles".

    The npcs are all parent to a family called "NPCs". The "bubble" is just one sprite.

    A more short explenation would be. If "bubble" is overlapping "NPCs", set "bubble" position to (NPCs.ImagePointX(0), (NPCs.ImagePointY(0)

    If there is a better solution for this please tell me! Any help is much appreciated!

  • Sounds like a collision box issue. The collison box is probably larger than the sprite and needs to be adjusted.

    The collision box is adjusted perfectly, though i think it's a screen render issue due to the pixel rounding being "off". It only shows from time to time, for example if the player stands on a certain hight. The gap is less than a pixel wide and about a tenth of it.

    Maybe there is a fix to this in the other properties?

  • I am making a pixelated game with the pixel rounding property "off", getting smoother camera follow and such.

    However, there is a small gap from time to time between the player and the ground, smaller than one pixel in-game. It looks quite ugly since he is slightly hovering above the ground. It's barely noticable but still quite annoying. How can I fix this without lowering the hitbox of the sprites (I want to keep exact meassures for them)?

    I noticed having the pixel rounding property "on" solving the issue, but I still prefer it to be "off".

    Any help is much appreciated!

  • I am such an idiot. Did not think of the "compare instance variable" condition with "door.type" = "lever.type" etc.

    Many thanks though!