How do I get some help because I'm about to cry??

0 favourites
  • 10 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Newbie here who has linked my project. I will try and point out where to navigate to and what issue I am having.

    https://1drv.ms/u/c/e4589a411e9a6ecf/EXIfNEeMHQtPg7oV13jzPcABiEmPhHGWIPeKx3PGOYxgBA?e=cKQZgJ

    Screenshot 1: You will see a lockerroom virus incident generated correctly in this little football simulator thing I'm making.

    Screenshot 2: For the life of me--and I've been trying for 3 days--I cannot get the player_text box to disappear like all of the other text boxes by clicking on Simulate again. I'm clearly missing something obvious here, but I'm pulling my hair out figuring it out. The other issue, it seems the player text REALLY QUICKLY loads some other text before loading the correct text. It just looks off.

    I'm sure for most of you, my organization and code lines are going to seem nuts, and I'm open to feedback, for sure. I've had a lot of fun building this so far as my first project, but I'm really stressing over this seemingly super easy fix.

    The parts at the very top, you can ignore. That's my next struggle (getting the load button to let a user load their own team names in).

    For now, all I'm trying to figure out is why the player_text doesn't disappear!

    Important: You'll want to have Virus (the actual button in the game) activated.

  • You don't set your Virus and Virus_Players variable in touch -> button_simulate to 0.

    So it will fire the events 188, 189 ... even if the correct event to set virus und virus_player are not triggered.

  • That makes sense, but it did not fix the issue still. I'm still seeing those positions appear when I either generate a new virus right away, or if the non-event triggers--those positions still hang there.

    I'm also not sure why, when running it the first time, the positions seem to do a super fast scramble before settling.

    This is all so strange! I'm obviously missing something easy here, but I just cannot find it.

  • Worked for me, but may be I understand the problem not entirely.

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

    Edit: No, you are right. It works only the first time clicking. That's strange.

    Edit 2: I think you have a race condition. If I delete the wait-actions in the Virus-Event it seems to work. But if I trigger those events only once I get only one Player. So it seems the Advanced Permutation takes longer than one tick.

    But it's nearly impossible for me to debug the whole program because of the waits.

    I would try to replace the waits and make the advanced permutation not in the 'set text'. But if this works I don't know.

  • When I deactivate all of the waits in Event-Virus, the same issue persists (plus more from removing the waits, obviously).

    You had a good idea in that maybe I just try its own text box versus sharing it for this event.

  • Your project lacks a lot of organization, that's sure. I tried taking a look, but changing something seems to generate other bugs, which is often a sign of a deeper issue.

    Here your main problem is that you are checking conditions at every tick. When you have a condition in the event sheet without a green arrow next to it, that condition is checked every tick. That means that, if the condition is met, the associated actions keep running as long as the condition is met. In your case that's a problem. You can use a condition called "Trigger Once" that changes the behavior of the attached conditions by firing the actions only the first time the conditions are met.

    Try the code in the image.

    Also, note that on line 111 you have On "Players Array" completed -> set player text. Removing that line seems to solve the issue of the text changing briefly before the players appear.

    I see that you don't use families, actions, functions and much more. There are a lot of things in Construct which can help you avoid unnecessary work (notice that most of your events repeat things over and over). I made a small example of a basic prototype of your app (only virus) that uses these things.

    dropbox.com/scl/fi/nkytxmktzjv6g5q6xvjnm/DemoImproved-1.c3p

  • I got it working! Long story short, it was that AJAX was pulling in the name too early, and not with the Event-Virus which was then replacing it (hence the weird quick/cycle change you'd see for a split microsecond.

    I put another condition on that first AJAX (Virus_Toggle no) and copied the AJAX down to the Event_Virus section.

    Phew!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your project lacks a lot of organization, that's sure. I tried taking a look, but changing something seems to generate other bugs, which is often a sign of a deeper issue.

    Here your main problem is that you are checking conditions at every tick. When you have a condition in the event sheet without a green arrow next to it, that condition is checked every tick. That means that, if the condition is met, the associated actions keep running as long as the condition is met. In your case that's a problem. You can use a condition called "Trigger Once" that changes the behavior of the attached conditions by firing the actions only the first time the conditions are met.

    Try the code in the image.

    Also, note that on line 111 you have On "Players Array" completed -> set player text. Removing that line seems to solve the issue of the text changing briefly before the players appear.

    I see that you don't use families, actions, functions and much more. There are a lot of things in Construct which can help you avoid unnecessary work (notice that most of your events repeat things over and over). I made a small example of a basic prototype of your app (only virus) that uses these things.

    https://www.dropbox.com/scl/fi/nkytxmktzjv6g5q6xvjnm/DemoImproved-1.c3p?rlkey=httgahlyhgcvc4dua71rn7z2y&st=wt6mydz3&dl=0

    Thank you for all of this! I am eager to learn more as a total novice, so I appreciate you taking the time to show me an example. I will be sure to check this all out over the weekend.

  • Your project lacks a lot of organization, that's sure. I tried taking a look, but changing something seems to generate other bugs, which is often a sign of a deeper issue.

    Here your main problem is that you are checking conditions at every tick. When you have a condition in the event sheet without a green arrow next to it, that condition is checked every tick. That means that, if the condition is met, the associated actions keep running as long as the condition is met. In your case that's a problem. You can use a condition called "Trigger Once" that changes the behavior of the attached conditions by firing the actions only the first time the conditions are met.

    Try the code in the image.

    Also, note that on line 111 you have On "Players Array" completed -> set player text. Removing that line seems to solve the issue of the text changing briefly before the players appear.

    I see that you don't use families, actions, functions and much more. There are a lot of things in Construct which can help you avoid unnecessary work (notice that most of your events repeat things over and over). I made a small example of a basic prototype of your app (only virus) that uses these things.

    https://www.dropbox.com/scl/fi/nkytxmktzjv6g5q6xvjnm/DemoImproved-1.c3p?rlkey=httgahlyhgcvc4dua71rn7z2y&st=wt6mydz3&dl=0

    The button/family changes you made make sense and are great. My question on them is, how did you go about creating the family?

  • Right click the family folder in the project bar and select add family. Note that objects of a family must be of the same type (ex: you cannot have sprite and text in the same family). For more information check the manual: https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/objects/families

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