LucasBird's Forum Posts

  • 12 posts
  • Hmmm...I gonna try this so, thank you for reply!

  • Hello. I'm trying to create a prototype of the Sky Diver game that was available on Nokia cell phones and made in Java. I thought it would be simple, but it's driving me crazy. Does anyone know how to code this correctly, please?

    Currently, my code is very buggy. The island grows toward the player, but apparently, because it's being scaled, it moves at an irregular speed. Initially, it increases quickly, but as it grows, the scaling speed decreases. This is not appropriate. The correct effect would be for the island to move at a consistent speed from start to finish, only accelerating when the player presses "W" to "fall" faster toward the landing area.

    Another big issue I'm facing is with the rings along the path. I managed to make them appear during the fall by using a method where the system creates the object every x seconds. However, the problem is simulating the Z-axis in a 2D game. The player needs to pass through these rings to score points, but Construct 2's collision options (like "is overlapping" or "is on top of") don't achieve the desired effect.

    I would greatly appreciate it if someone could help me create this prototype. Thank you so much!

    I'm sharing images of my event sheet. My code is a complete mess, and currently, not even the character's movement is working anymore. Sorry for not organizing things very well; I'm a beginner in Construct.

    Video Link: youtube.com/watch

  • Yes, I tested it in debug mode, and the arrays receive the individual number of the terra object. The player moves to the object's location, but when they arrive, it doesn't switch the object's frame as it should. Also, if I click on another terra object while the player is on their way to the first one, the action for the first object gets canceled, and the player moves toward the last clicked object instead.

    My code seems identical to yours now. I fixed the issue where the click detection was set to respond only to left mouse clicks, and I reviewed the entire code. It looks correct, but I believe there might be a conflict caused by using both codes for moving the character with pathfinder behavior. I can't get it to work properly.

    I'm attaching a link for a youtube video showing how the system works in another game, which demonstrates the functionality I’m aiming for. Thank you for helping me!

    youtube.com/watch

  • I edited my code to match yours, tested it, and it still didn’t work. I tested it with my player movement system both enabled and disabled. Interestingly, when I tested your code in the structure you made, it works, but when I try to implement it in my system, it doesn’t work. If I disable my player movement code, leaving only your code, the player doesn’t move. If I enable both codes simultaneously, the player moves freely but doesn’t activate the sensors through the array.

  • I noticed that in your code, the player only moves if you click on the red sprites that act as sensors, but if you click on the white area, the player doesn’t move. In my case, it’s different because the player moves freely around the map. The movement by clicking on specific objects, like crops, for example, is an additional feature. This seems to be causing conflicts in the code. Thank you for responding!

  • I just set up your code in my event sheet in the array section, and when I tested it, to my surprise, it didn’t work. This leads me to believe it’s conflicting with my code for moving the character using the behavior that’s already in place. When I click anywhere on the ground, the player moves, and I can’t remove this behavior. When I create a system involving moving the character with the same Pathfinder behavior, it causes a conflict with the current character movement code, right? How could I use your code to move based on the array without conflicting with the existing Pathfinder movement system? I’m not sure if I was very clear, but thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to thank you, I'll send you some money as soon as I get paid, thank you so much :)

  • Thank you so mutch dop2000 for reply and the exemple, I will try to follow thouse instructions, Im not a code person, but I having fun, and you help me a lot! :)

  • The PlayerMove object is responsible for movement, while PlayerPug is just the animated sprite that visually follows PlayerMove using the pin behavior

    It seems my code has a conflict, and the array isn't working as expected. When I click on a "terra" object (the terrain sprite), it gets visually selected as it should. However, if I click on another "terra" object while the player is already moving towards the first one, the second object gets selected too, but the player cancels the path to the first object and moves directly to the last one clicked.

    What I want is for the player to follow a task queue, like in The Sims. The player should first go to the initial "terra" object, perform the assigned action there, and only then move to the next "terra" object clicked, executing tasks in the order they were added to the queue.

    I’m sending another image of the event sheet with the player movement code and the array system, which apparently isn’t working. Thank you for your response so far.

  • Sorry, I was busy with work. Thanks for any help!

  • I'm trying to create a harvesting system with an array, I'm close to getting it right but there's still something missing. Currently I can click on plot objects (planting areas) and they get selected, the player goes to the location but doesn't perform any action, just stays still.

    Code objective: The player can click on multiple plots (planting areas), which are highlighted with a white effect when selected. The character will perform the harvest in the order of the clicks, completing one action before moving on to the next.

    Final Revised Code:

    Event 1: Mouse -> Left button clicked on Terra

    Conditions:

    Terra -> isSelected = 0

    Actions:

    Terra -> Set animation frame to 1 (shows the effect).

    Terra -> Set isSelected to 1.

    ActionsArray -> Push back Terra.UID on X axis.

    Event 2: System -> Every tick

    Conditions:

    Player -> isBusy = 0

    ActionsArray -> Value at (0, 0, 0) > -1

    System -> Pick Terra by UID (ActionsArray.At(0))

    Actions:

    Player -> Set isBusy to 1.

    Player -> Find path to (Terra.X, Terra.Y).

    Event 3: Player -> On Pathfinding arrived

    Actions:

    System -> Wait 1.5 seconds (simulates picking).

    Terra -> Set isSelected to 0 (deselects the plot).

    Terra -> Set animation frame to 0 (returns to normal frame).

    ActionsArray -> Pop front on X axis (removes the processed UID).

    Player -> Set isBusy to 0.

    I don't know what I'm doing wrong, if anyone can help me I'd appreciate it!

  • 12 posts