RBuster's Recent Forum Activity

  • In the end, none of the options discussed here worked properly. Some conflicts exist because bases can be related to more than one button (per control option)/path (per "overlay" option). I'm stuck on this and I would really appreciate it if anyone else suggested a viable solution to this type of mechanic. Thanks.

  • I changed the arrangement of the conditionals and now it's working, however, I'm really having trouble leaving the bases free (not occupied). "Overlapping" checks all the time whether or not one object is overlapping another? Because if so, how do I check that it is not overlapping, it should change the boolean.

    we.tl/t-wLNGpSBa5w

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In fact, I already changed the code to check the bases connected to each button, but something is wrong and the objects no longer move. I'll wait to see if anyone could check the file to see what I might be doing wrong. But thans anyway.

  • Thanks for answering dop2000

    Maybe you are not clearing the occupied status of the base?

    I'm enabling the "occupied" boolean when the object is overlapping the base and disabled when it stops overlapping. Would there be a more efficient way to do this?

    But the solution with the overlapping paths is probably easier.

    The "overlapping paths" suggestion is easier but is not working properly, as I showed in the last image. I'm going to do some tests to see if this other way (using variables to connect to the button) will work.

    EDITED: we.tl/t-mzKJL5jlsj

    Just for you to check if this is the idea.

  • Hi dop2000

    Thanks. I will implement your first suggestion, because the paths are really overlapping the bases. So I don't need to use "Pick all" first?

    EDITED: I included the conditions and fixed the order, and it is indeed moving to the nearest base, however, they do not return to the previous base when I click the same button.

    Or you can give unique IDs to each base and specify on the button which bases it's connected to.

    Maybe this is the solution, but how do you specify which bases are connected to the buttons in the code?

  • I have a problem creating mechanics for a game.

    In the attached file, you need to click on the buttons to move the colored objects, according to their proximity, always giving preference to the blue one. Whenever you click a button, the system has to identify which of the two objects is closest to it and send it to the base closest to that button. It started working well but then it stopped moving the objects and sometimes sent the object to a completely different path.

    I did it another way, but the code was too long and I'm trying to cut it down.

    Could anyone help me solve this mechanic?

    Thanks in advance

    we.tl/t-vtycEuQAxF

    EDITED: Objective of the game: move the objects, removing the red ones in front of the blue one (there will be many scattered across the screen) until the blue one reaches the end. There is a movement limi, but I just want to solve the mechanics.

  • You are right. As I no longer had the object on the screen, I included it again and deselected this option in the panel. Thanks.

  • I am destroying instances of an object and creating new ones, so I have no way to disable "set angle" directly in the panel. As I didn't find an option to disable "set angle" in the code, I tried to set the angle of the created object to "0", but it didn't work, whenever the object returns, it is upside down.

    Thanks for advance

  • Thanks for answering.

    Sorry for only including this part of the code, but it is long and only this part presents an error. I'm including a printscreen to make it easier to read.

    Regarding the error: this part of the code should display a total (totalCharacters) of digits (letters or numbers) one by one with a pause of 1.5 seconds between them and as it shows each digit, it then shows an asterisk in its place.

    Example with 3 digits:

    Step 1: 7

    Step 2: *

    Step 3: * 4

    Step 4: * *

    Step 5: * * 1

    Step 6: * * *

    The error that occurs is that the first digit (7 in the example) is repeated 2 times, generating 4 digits in the result, instead of 3

    Example of a 3-digit error:

    Step 1: 7

    Step 3: *

    Step 4: 7

    Step 5: *

    Step 6: * 4

    Step 7: * *

    Step 8: * * 1

    Step 9: * * *

    I replaced the timer for every second event to see if the error could be in the behavior, but it didn't solve it. The strangest thing is that this problem only appears in mobile device browsers. In the 3 desktop browsers (edge/chrome/firefox) this system works perfectly

  • Is there anyone who could help me solve this problem? I've been stuck on this for over 3 days now. I just need some ideas.

  • Maybe the problem could be the "Timer"? Has anyone experienced this type of problem before?

  • The code below is working normally in desktop browsers and presenting a duplication error in the first digit when opened in mobile device browsers. It also happens on edge in the latest version when opened on a laptop (the same version works normally on a PC).

    Could anyone take a look and see if they can find any possible problems in the code?

    [LettersS_Interval]

    ----+ System: Trigger once

    -----> System: Set totalCharacters to 0

    -----> System: Set countDigits to 0

    -----> System: Set count to 1

    -----> System: Set amount to 10

    -----> System: Set totalCharacters to amountOfDigits

    -----> Array: Set size to (10, 1, 1)

    -----> Array: Set value at 0 to "A"

    -----> Array: Set value at 1 to "B"

    -----> Array: Set value at 2 to "C"

    -----> Array: Set value at 3 to "D"

    -----> Array: Set value at 4 to "E"

    -----> Array: Set value at 5 to "F"

    -----> Array: Set value at 6 to "G"

    -----> Array: Set value at 7 to "H"

    -----> Array: Set value at 8 to "I"

    -----> Array: Set value at 9 to "J"

    -----> System: Create object timer on layer "PanelTXT" at (34, -37), create hierarchy: False, template: ""

    -----> AdvancedRandom: Create permutation with amount values starting at 0

    -----> timer: Start Timer "changeDigit" for 1.5 (Regular)

    ----+ timer: On Timer "changeDigit"

    --------+ System: totalCharacters > 0

    ------------+ System: Pick panelText where panelText.id = countDigits+1

    -------------> panelText: Set text to Array.At(AdvancedRandom.Permutation(countDigits-1))

    -------------> textTemp: Append Array.At(AdvancedRandom.Permutation(countDigits-1))

    ----------------+ System: Trigger once

    -----------------> System: Wait 0.75 seconds

    -----------------> panelText: Set text to "*"

    -----------------> System: Wait 0.75 seconds

    -----------------> System: Add 1 to countDigits

    -----------------> System: Subtract 1 from totalCharacters

    --------+ System: Else

    ---------> System: Set countDigits to 0

    ---------> System: Wait 0.75 seconds

    ---------> System: Set keyActive to True

    ---------> timer: Stop Timer "changeDigit"

    ---------> timer: Destroy

    ---------> System: Set group "LettersS_Interval" Deactivated

    ------------+ System: Is timerController

    -------------> System: Set group "Timebar" Activated

    ----+ System: Repeat amount times

    --------+ System: Pick keyText where keyText.id = count

    ---------> keyText: Set text to Keyboard.StringFromKeyCode(64+count)

    ---------> System: Add 1 to count

RBuster's avatar

RBuster

Early Adopter

Member since 29 Oct, 2012

Twitter
RBuster has 2 followers

Connect with RBuster

Trophy Case

  • 12-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies