brendanpoke's Recent Forum Activity

  • I don't have much experience with multiplayer plugin. Perhaps with string value you need to check that it's not empty. Add this condition to "For each cars" loop:

    Multiplayer.PeerState(cars.peerid,"inputs") not equal ""

    your method doesn't work. I think is because the action set client input state "inputs" to value (int(cars.inputs2)) must be a number.

    Now I solved by putting an event below:

    if cars.inputs2="" --> set client input state "inputs" to value 200.

    and instead of your condition I put cars.inputs2 ≠ 200.

    Now it work.

    Anyway thanks. I realized that making multiplayer games is MUCH harder than making local games.

    I'll probably ask for help again

  • Try increasing the precision in event #2 to "float 4 bytes". 1 byte can only represent numbers between 0 and 255.

    Thanks. now it works almost completely.

    But there is still a problem, when the stick is positioned to the right (so the value is 0) the problem persists.

    maybe I should change the "inputs" variable to a string?

    ugh I'm really struggling.

    How should I do?

    [update] I changed the "inputs" variable as a string and now it seems to work, but the sprite continues to move even when the stick is not touched, it continues to go in a straight line in the last recorded angle.

  • > and then Multiplayer -> set client input state to value Peer.inputs

    And then what do you do with it?

    Input state is just a value, it doesn't matter if it's from a keyboard, gamepad, mouse or any other input method. You need to translate this value to character movement. Perhaps something like this:

    Player move (speed*dt) pixels at angle (Multiplayer.PeerState(Player.peerid, "stick_angle"))

    Check out the official Pong example.

    yes, there are other events. Here is a screenshot of the entire event sheet. There aren't so many. If you want I can also share the project, but I think you should have a gamepad.

    With these events, everything works for the host. But for the Peer if I enable the event 16 enable local input prediction... seems to work fine, but what happens is that the object keeps moving back to its original position.

    maybe I'm making a mistake or this is not the correct method, what is it?

    [update] I noticed that the object moving back error only occurs when I try to move it up (for Peer preview) then moving the analog stick between 0 and -180. However, if I move it between 0 and 180 the object seems to move correctly in that angle.

  • I want to ask already if what I'm trying to do is possible or not, (before continuing to try in vain).

    In short, I studied the multiplayer plugin a bit and looked at the example of the tutorial (the fourth), this: https://editor.construct.net/#open=multiplayer-game

    and I would like to know if it is possible to do the same thing but making each player use a gamepad.

    And use the analog stick to move the character at a precise angle. I already tried like this: Peer -> set inputs to -> floor(angle(0, 0, Gamepad.Axis(0, 0), Gamepad.Axis(0, 1))) and then Multiplayer -> set client input state to value Peer.inputs

    but it doesn't work and I can't understand why... someone help me?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think I solved the problem:

    the "audio codec" item should not be selected to "auto".

    I selected opus and it seems like audio is as the same time with video.

  • Thanks, I get it and this will help me a lot to learn javascript.

  • I'm using video recorder to record a presentation video for my game.

    The images flow well, there is no lag so I don't think there is a problem regarding the power of my PC.

    The only problem is the audio, which comes before the images. I looked online for a simple program to synchronize it, but I couldn't find it.

    And anyway I want to know if I can solve the problem.

    Do you have any ideas?

  • getAllAnimations() is an array. Here are the names of the first 2 animations:

    runtime.objects.Cannon.getAllAnimations()[0].name

    runtime.objects.Cannon.getAllAnimations()[1].name

    But I would like to assign the local variable string "allAnmt" so that it countains all the animations of the sprite, is it possible?

    Because what I get now is just empty spaces separated by comma.

    As many commas as there are animations -1. But there are no names. Why?

    With your script I select the animation at that index. I want to get the names of all the animations.

  • Thanks.

    Could you tell me what I'm doing wrong? It doesn't work that way.

  • I was looking for a way to check if a sprite has a certain word for at least one of all its animation names in an event.

    I found this post on the forum --> https://www.construct.net/en/forum/construct-3/how-do-i-8/search-animation-names-172085

    dop2000said:

    AnimationName expression returns only the current animation. There is no way to retrieve the list of all sprite animations. (except for calling internal C3 methods from Javascript, which is not recommended)

    I would like to know why he said that is not recommended?

    What is the script to do it?

    Thanks.

  • I hope I'm not going off topic "programming and Construct3" by opening this discussion. But I wanted to say that I am passionate about anime, so I would like to know, even just out of curiosity, if there is anyone else on the forum who likes them. Some anime have given me great emotions and fun, and it would be nice to try to create a game together on an existing anime.

    I started programming precisely because I have watched them (and maybe I thought I would want to participate in the creation of one?). in fact I ask myself if, given the choice, I would be a video game programmer, a manga artist, or work on the creation of an anime? I like drawing, but I feel comfortable programming, even if doing it alone is becoming more and more boring...

    Is there anyone who shares something like this? It would be interesting to talk about it.

    by the way, some of my favorite anime are the romantic ones like Sailor Moon, and the comic ones, like Sergeant Keroro (Sgt frog).

    Yours?

  • You are right! In fact dpad up is negative, but the strange thing is that the value is -1!

    I've already thought about it, I don't know if I can write events that work for all gamepads, but for now I just want to test the difficulty of the game with my gamepad, I'll think about that later...

    Who knows how to find the mode button is (it wasn't select that was missing, but mode, which is not detected in any way in the panel), but it must be something even more complicated, I don't want to think about it... XD

    Yes, if used with good sense, technology is fantastic!

brendanpoke's avatar

brendanpoke

Member since 7 Aug, 2019

Twitter
brendanpoke has 1 followers

Trophy Case

  • 5-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

9/44
How to earn trophies