DFORMS's Forum Posts

  • Hi Savvito, yea that's the first thing I checked and everything seems to be in the right place regarding the image points for both player animations and bandana animations.

    Edit:

    I've just noticed that the Bandana is off even when not mirrored.

    Edit 2:

    And this pixel is not 1x1. Could be related.

  • Hi, for some reason my pinned object (Bandana) is off by .1 px from the image point when the player/it is mirrored.

    I had it working before. I haven't been able to identify the problem so far.

    Any thoughts?

    Here is my .capx: http://dforms.ca/MGC-165.c3p

    Thank you!

  • It works. Was that really all it was... I probably have a bunch of other mistakes like this one. I'll have to review a lot. Don't know if you had a look, but let me know if anything else caught your eye. I've added you to my list of people to credit. Again big thanks Lionz!

  • I am very grateful for your help Lionz. I'll try that tonight and report back.

  • Alright, I have a bug with my NPC of type C which I am having trouble pin-pointing the cause and resolving. I'm starting to think I may have misunderstood how to create various NPC types (NPC_A, NPC_B and NPC_C) with the default one (NPC_Soldier). My idea was to use the default NPC_Soldier and rely on local variables to set the parameters of each type (HP, fire rate, speed, LOS, etc.). Everything seemed to be working fine until I added equipment to the NPC_C (gas mask and bag).

    I made a video showing the bug (see the NPC_C on the far right when I'm killing the others).

    https://youtu.be/AnVuDFjVhgA

    The gas mask and the bag are in the NPC_Soldier container, so every instance of NPC_Soldier has it, but I set it to invisible if NPC_Soldier.type != to c. I wanted to avoid doing this at first because it creates many useless invisible objects. Unfortunately, I wasn’t able to get it working without adding the gas mask and bag to the NPC_Soldier container. I suspect this could be at the root of my issue.

    If you're willing to have a look, lines of interest are [317, 318, 319] [457, 458, 45] [472, 473, 474, 475] and the NPC_Clean_Up_Dead function on line 649.

    Here is my full .capx: http://dforms.ca/mgc/download/MGC-v157-bug.c3p

    And you can play it here: http://dforms.ca/mgc/

    Note, you can use the Dev Menu by pressing ESC (Dev Mode, God Mode and more). Turn your audio down!

    It's my first game and I learned how to use Construct 3 while building it so it's obviously not perfect. I'm hoping to keep improving, but this issue is very discouraging. I've been able to fix most issues on my own. This one is kicking my ass.

    Thank you in advance! If I manage to finish this game, I'll make sure to give credit to everyone who helped.

    Any feedback is welcome!

    Tagged:

  • You do not have permission to view this post

  • Hi Dop,

    Yes, I set the Obstacle to Custom for the NPC LOS.

    I got it to work with the Wall_Enemy (pink box), but not the Floor_HB_Ground (blue box). I'm struggling to understand why.

  • Hi,

    I'm having trouble with my NPC's line-of-sight. It's set to custom and I've added an obstacle (blue box) with the Add obstacle action, but the NPC can still see the player. It works when I add the Solid behaviour to the box, but that will cause other issues. Does the obstacle have to be solid in order to obstruct the line-of-sight?

    Thank you

  • What I'm doing is creating NPC spawn points (A, B, C, etc.). Once the player gets close to a NPC spawn point the NPC is created. If the player is far from an NPC that NPC is destroyed. I'm only doing it for NPCs for now but I may end up doing the same for items and other objects.

    Also I try to use the same NPC object for all my enemies. I change the color and add equipment depending on what type of NPC is created. That way I don't end up with a huge list of events. They use the same events and functions but their attributes are different depending on the value of their local variables.

  • Awesome, thank you Laura!

  • You do not have permission to view this post

  • I would like to know how others handle multiple NPC types. I started off with only one NPC, type A. When I was ready to start adding additional NPC types; obviously, I wasn’t going to just duplicate the lines for each individual NPC type. So I used local variables to configure and style the NPCs depending on their type, which works ok. I guess the only disadvantage in doing it this way is having to create separate sprites for equipment and apparel (img1). I thought creating different animations for each type would also be painful and confusing.

    The other thing I did was creating spawn points for the positioning of the NPCs with the aim of reducing the potential lag and perhaps eventually randomizing positions and types (img 2). The NPCs will spawn when Player X <= to each NPC spawn point. This way I don't have 30 NPC running at once all over the level.

    Anyways, how do you handle multiple NPC types in your games?

  • You do not have permission to view this post

  • I'm not sure if I understand the question right. Anyways, this is how I am display the items in my prototype at the moment (inventory menu).

    I'm using a loop to display the weapons/items and their stats.

    CurX: The current zero-based index for each dimension in a For each element loop.

    Arrays (Array expressions): construct.net/en/make-games/manuals/construct-3/plugin-reference/array

    Edit: I didn't make the sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're welcome. I hope it helps.