ErikSwahn's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

  • >

    > It seems to work quite nicely. The first enemy opens the first door. They all have the same variable at 0 however. How did you connect the first enemy with the first door exactly?

    >

    They all start with variable at 0 so on the:

    On start of Layout | set InstVar to Self.IID

    it replaces the variable with each object's respective INSTANCE ID. You could start there or manually assign the variables.

    I like using that since it takes less work. Now it's just a matter of repositioning the enemy sprites. You can even modify the capx so instead of destroying the enemy it simply toggles a variable to open/close doors...

    Aha, but is there no way to compare if they just have the same value to an instance variable called "type"? If they both have one and shares the number "0" for example. It would be super easy to just drag in the "lever" and the "door" and then set their instance variable's value ("type") to "0".

  • Here: https://www.dropbox.com/s/g9hnzyf6tim0m ... .capx?dl=0

    It seems to work quite nicely. The first enemy opens the first door. They all have the same variable at 0 however. How did you connect the first enemy with the first door exactly? I want to be able to set the variable to the same for those to connect.

  • I want to make doors open using levers that are placed either next or far from a door. I also want these to affect each other through having the same variable. For example, lever 0 controls door 0, lever 1 controls door 1 and lever 2 controls door 2. One lever might even controls two doors if they share the same value, or vice versa. So instead of making more sprites for each lever, I want to just set their values the same.

    How do I compare this in the events sheet?

    Could someone show an "example picture" or explain this to me? Thanks.

ErikSwahn's avatar

ErikSwahn

Member since 15 Jul, 2014

Twitter
ErikSwahn has 1 followers

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies