1st Instance of Object Not Reacting While 2nd Instance Does - Help!

From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.

    Good day!

    PRIMARY ISSUE: An instance of an object is not reacting to player input specifically after the player interacts with the other instance of the same object.

    Controls:

    Arrow Keys: Move the MrSpy_Move (invisible during gameplay) object.

    On-screen arrow keys: Move the MrSpy_Move object and make the MrSpy_Img rotate accordingly for the angle of movement.

    On-screen green button: Initiate theft of document from Guard when conditions are met.

    DETAILS: The character object, Guard_Steal (hereafter just "Guard") has a meter that appears over its head when the player character, Mr Spy comes within range and has line-of-sight (LOS) to the Guard and the Guard does not have LOS to Mr Spy. Using the on-screen green button, the player presses and holds the button to attempt to "steal" a document the Guard is holding. The meter indicates how long until that process is deemed complete. Any interruption - releasing the button, the Guard seeing Mr Spy, or Mr Spy losing line-of-sight to that Guard - will stop the process and the meter will go down.

    PROBLEM: Go figure, I had this working perfectly before...

    When you load the .c3p file, you'll see two instances of the Guard object. They should both be facing to the right and you can see the faint cone for those Guard's LOS.

    You can try to "steal" the doc from either Guard right away. To do so, make sure you see small green circles spawning around the Guards and shrinking smaller. That will tell you that you are in range and can attempt to steal. If the circles are red, that means you're in range but either you are in the Guard's LOS or you do not have LOS to the Guard, itself.

    The Guard on the left should initially react properly if you attempt to steal from him first. However, once you attempt to steal from the Guard on the right and then go back to the Guard on the left, the Guard on the left will not show any progression of theft. You can be completely out of LOS from the Guard, have the Guard in LOS by Mr Spy, and the green button is pressed down, but the Guard will not show its meter advancing. I've confirmed this through Debug Layout, as well.

    Both Guards start out essentially the same, so there's no reason they should be reacting differently - especially when the Guard on the left initially works the way it should.

    More info: Here is another screenshot of the event sheet and a copy of the .c3p file.

    https://drive.google.com/file/d/1TsrqD13V4OapepCLXoKKIYCb07FN5Oir/view?usp=sharing

    Your insight would be much appreciated. Thank you!

    You should've posted this in C3 forum.

    I think the issue is with LOS - if you add debug actions to these events, you'll see that after you steal the documents from the guard #1, the guard #0 will always have LOS to player, even when it's facing the other way. I don't know why this happens, may be a bug with LOS behavior..

    Actually, you don't even have to steal anything. If you step into guard's cone of view and then run away, it will continue to have LOS to the player, no matter where it is.

    dop2000 Thank you for checking.

    (First, I'm confused as to why I should have posted this in the C3 forum. Maybe I'm missing something? Since this is an issue I needed help with, that's why I posted it here. Could you clarify, please?)

    Based on your debug, I guess the next thing to do is do a stand-alone test and submit this to the bug report on GitHub.

    Ashley If you have a moment, do you have any other suggestions or input before I post this to the bug report?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    Your project is made in Construct 3, this is Constuct 2 sub-forum.

    Ashley will not investigate this unless you make a small project to replicate the issue and log a proper bug report. Also, I am not certain that this is a bug, maybe there is something wrong with your other events.

    OH!! Ooops. I honestly didn't see that I put this in C2. My mistake.

    As to Ashley investigating - naw, I know he won't look into it deeply without an official bug report. I was just thinking if there were any other suggestions for me to look at prior to a report. Either way, no worries.

    I'm going to go ahead and RE-post this in the C3-How Do I forum proper.

    Ashley, if you want to delete/lock this post, all good.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)