DFORMS's Recent Forum Activity

  • Hello everyone, I started implementing gamepad controls yesterday and the aiming is kicking my ass... I usually am not bad at figuring things out on my own, but right now I'm not sure where to go from here.

    Here is a recording of what I have so far:

    Subscribe to Construct videos now

    In a nut shell, I want the aim (center of the red circle) to stop at the extremity of the viewport minus the HUD on the right. See the screenshot below:

    Here the .c3p for my prototype: dforms.ca/downloads/GamepadMouseAimGame.c3p

    Note: Clicking on the link doesn't work right now. Just paste it in the URL bar.

    http://dforms.ca/downloads/GamepadMouseAimGame.c3p

    And I'm using this example project: dforms.ca/downloads/GamepadMouseAimDemo.capx

    http://dforms.ca/downloads/GamepadMouseAimDemo.capx

    Thank you for your assistance!

  • lionz I thought it didn't matter as long as I was using image points. The documentation doesn't mention anything about having to center objects when using the pin behavior.

    eleanorjmorel I ran into issues early on when using pixel rounding and opted to have it turned off. Regardless, I tried with pixel rounding and got the same result plus some jittering when jumping. I'm worried that turning it on now will cause other problems.

    I don't know what the cause is, but I'm convinced at this point that my bandana's offset issue is related to the player sprite's width being modified on runtime.

    I am currently comparing my version 165 to my version 162. In v162 the player sprite is not deformed and the bandana is positioned properly.

    Edit:

    I give up. I'm reverting to my version 162 and pick up from there. Thank you for trying to help guys.

  • I've just spent another two hours trying to understand what is going on. As far as I can tell, I'm doing everything right. Are pinned objects off when mirrored regardless?

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

  • Try Construct 3

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

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

DFORMS's avatar

DFORMS

Member since 1 Feb, 2020

None one is following DFORMS yet!

Trophy Case

  • 4-Year Club
  • Email Verified

Progress

5/44
How to earn trophies