CREATOR4's Recent Forum Activity

  • If down arrow key is being pressed, set tank's targetAngle variable to 90 (down)

    If tank's angle is not equal to tank's targetAngle, smoothly rotate tank towards targetAngle

    Else, move tank

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't have much experience using physics, so I may be wrong, but I think you could try using Physics for this. Using joints to connect the grapple object, arm, and player

  • You can't pick a BadTroop by UID, and then pick a different BadTroop by UID in a subevent. Pick By UID only succeeds if the object you're picking is within the group of already-picked object. And since the first Pick BadTroop By UID narrows the picked group of BadTroops down to a singular BadTroop, the second one won't work unless it's the same exact BadTroop that was already picked (that was a tongue twister)

    But what's really messing you up here is the "Pick All GoodTroops." This is resetting the picking done in ForEach. Then you are picking a single GoodTroop, checking if the BadTroop it's targeting is the same BadTroop that was already picked earlier, and then telling all GoodTroops to shoot at it.

    Not only is "PickAllGoodTroops" messing your code up, but you don't need it. You're already looping through each GoodTroop to begin with, so any code in the ForEach will run for every single GoodTroop

  • I know I need to use the "Send Message" action, but I don't know when/where to send it. At what point do I need to send the message, at every generated piece of the level (prebuilt scenes) or at the beginning or the end?

    This is up to you. You could hypothetically send the message at any point. In the beginning, or when each piece is created, or at the end

    Do I send the message from the peer to the host, or do I broadcast the message from the host to the peer?

    As far as syncing, this doesn't matter. One player just needs to create the level layout, and the other player(s) need to receive that level layout. It can be the host or the peer that creates the layout and sends the message, although generally it makes sense to give the Host more control over the game. So Host -> Peer(s) is fine

    What exactly do I send?

    Here's an example with 2 methods. One is sending the entire layout at once, and the other is sending the layout piece by piece.

    dropbox.com/s/9xck9lejimkq9rv/Multiplayer%20Layout%20Sync%20Example.c3p

    You could also send a seed if you have your layout construction set up that way. This would be as simple as sending the seed in a message

  • You have 16 possible combinations, right?

    Frame 1 - Frame 1,2,3,4

    Frame 2 - Frame 1,2,3,4

    Frame 3 - Frame 1,2,3,4

    Frame 4 - Frame 1,2,3,4

    Think of these as 4 sets of 4, where the first sprite's frame determines the set from 1-4, and the second sprite's frame determines the number within that set from 1-4

    Since you have 16 possible combinations, what you can do is use Advanced Random to pick a random number from 0-15 (16 digits, starting at 0) without repeating. You can then translate this number into a two different digits. One is a set number from 0-3 (4 digits, starting at 0) and the other is a number within that set from 0-3

    For example, let's say you ask Advanced Random for a random number between 0 and 15 and it gives you 5. We can translate this into two numbers.

    First, let's get the set number. To do this we divide the random number by 4 and round down. This will give us a number that is either 0, 1, 2, or 3. This will tell you what frame the first sprite should be.

    floor(5 / 4) == 1

    So we are in set 1. The first sprite's frame is 1.

    Then, let's find out which frame within that set we are. To do this you can use modulo to find the remainder after dividing by 4. This will also give a number from 0-3.

    5 % 4 == 1

    So this is the frame for the second sprite. Frame 1.

    So 5 translates into Frame 1, Frame 1

    0 would translate into Frame 0, Frame 0

    floor(0 / 4) == 0

    0 % 4 == 0

    1 would translate into Frame 0, Frame 1

    floor(1 / 4) == 0

    1 % 4 == 1

    4 would translate into Frame 1, Frame 0

    floor(4 / 4) == 1

    4 % 4 == 0

    11 would translate into Frame 2, Frame 3

    floor(11 / 4) == 2

    11 % 4 == 3

    15 would translate into Frame 3, Frame 3

    floor(15 / 4) == 3

    15 % 4 == 3

    Each number from 0-15 will give a unique combination of numbers for Sprite 1 and Sprite 2

    Let me know if you have any questions!

  • You can use Multiplayer's "Send Message" action to send the seed

    Also, instead of using remote preview, you can hold Alt/Option and click Preview Layout twice to open two preview windows

  • Pretty fun, even for how simple it is

    I'd like to see some of the NPCs have more complex and difficult AI

  • Make it so that the landing animation cannot be interrupted by the moving animation

    Also make it so that once the landing animation is over, the character can resume playing moving animations

  • I've been experiencing a gradual slowdown as well. I think there's a memory leak in the latest C3

    May not be related to your problem tho. Can you run the preview in debugger and see if there are any objects being created infinitely?

    Also, do you have a lot of loops?

  • Here are two different ways to make a camera

    1. Give the player's character the ScrollTo behavior

    Simply give the player's character the ScrollTo behavior. This is quick but is limited.

    2. Give a separate invisible camera object the ScrollTo behavior

    Make a an invisible sprite object for your camera. Give it the ScrollTo behavior. Now make the camera follow the Player's character

    --

    Regarding your health bar and item, check the layers' parallax settings. A parallax setting of 0 x 0 will result in objects that never move in relation to the camera- they stay fixed in 1 spot on the screen

    If every software had it I'd probably be better off tbh

  • Argh

    https://i.imgur.com/elUMEZC.mp4

    Great aesthetic. Do you mind sharing where you got the artwork for the ground?

CREATOR4's avatar

CREATOR4

Member since 7 Sep, 2019

Twitter
CREATOR4 has 1 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

8/44
How to earn trophies