ErikSwahn's Forum Posts

  • The player can kill enemies to get xp. The problem is that if 2 enemies die at the same time it only gives xp for one of them.

    For example: The enemy gives 2 xp if it dies and the player´s arrow hit 2 enemies at the same time which should give the player 4 xp in total, only 2 xp is given.

    Can I make this work with a "for each" loop? And if so could someone put together a foolproof example in the event sheet and screenshot it for me?

  • I noticed after publishing my game on sites that it runs differently for different users. I exported and uploaded the game as html. One person seem to get all texts in black instead of white and some colors/filters don't seem to be on at all or just not displayed right. I do use effects on layouts and objects in my game like "set color" or "exposure" and such.

    Is there any known solutions for this? Have people experienced this before?

  • Thanks! Although "on created" and "on start of layout" seems to trigger when loading...

  • 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 :)

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

  • Try Construct 3

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

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