dop2000's Forum Posts

  • No worries!

    And here is an example demonstrating why using "wait" in events that run on every tick is a bad idea:

    dropbox.com/scl/fi/9q36kmmj5hsos5y85f1j5/WaitSucks.c3p

  • The first event on your screenshot will repeat on every tick if any soldier has a line of sight, and it will create lots and lots of delayed threads because of the Wait action. This is a common and very serious mistake.

    You need to use Timer behavior instead of "waits". Something like this:

    Soldier has LOS to target
    Soldier timer "attack" is NOT running: Soldier start a timer "attack" for random (0.5, 3) seconds
    
    
    Soldier on timer "attack" : Soldier stop
    .. Soldier has LOS to target: Soldier fire a bullet at target
    .. Else: Soldier find path to another target
    
  • Try searching for "scrollable menu", "scroll menu", "scroll list". There are lots of examples and tutorials.

    construct.net/en/tutorials/itemmenu-scroll-791

    howtoconstructdemos.com/scrolling-a-list-of-players-scores-images-etc-example-a-capx

    construct.net/en/tutorials/search

    The easiest solution is to add an invisible background sprite with Drag and Drop behavior. And add all menu items as children to that sprite.

  • There are lots of problems in your code. Avoid using too many non-triggered events (which can run on every tick). Especially event #5 - it will repeat about 60 times per second while the conditions are true, and because you have "Wait 1.5s" action, it will create lots and lots of delayed threads. They will continue running and will delete other records from the array, will change the player's state to not busy, and generally will break everything.

    Check out this example:

    dropbox.com/scl/fi/0mww2lb7mvq7zerfjtoct/PF_Stack.c3p

  • 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 ""

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

  • After "Find path" you need to wait for "On path found" event and tell the player to move along the path. Or you can use "Wait for previous action to complete". See the official Pathfinding example.

    And check which objects are moved with pathfinding - Player or PlayerMove?

    Also, in event #4 you need to pick the Terra instance by UID, otherwise all of them will be deselected.

  • 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.

  • I just tested on my monitor and it scales to fit the entire screen.

    Did you enable fullscreen or just maximize the window? Window header and borders are using some space too.

  • It's not possible to help you without the project file. Check that the objects are on correct layers, check layer settings (scale rate, parallax etc.)

    Press Shift+F4 to run the project in Debug Mode and debug.

  • There is an official example project "Console typist" - it's different from your game, but you can study it and use some ideas.

    I also found this video, not sure how good/bad it is:

    youtube.com/watch

  • Could you post a screenshot of the events?

  • You can do this with an inverted "Is key down" condition:

    Is Left key NOT down
    Is Right key NOT down : Set animation speed to 0
    

    Or, if you are using Platform behavior:

    Platform is moving : set animation speed to 10
    
    Else : set animation speed to 0
    
  • "Compare two values" doesn't pick instances and compares the distance only to the first enemy instance (with the lowest IID, which may not be the nearest)

    Use the Line of Sight behavior instead, it will pick the instances.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The easiest solution is to give the AI the ability to see player's numbers.

    When it knows exactly how many 2s on the table, it can't lose. So all you need to do is to add some randomness to its decisions.

    Say, a 30% chance of bluffing, 20% chance of saying "lie" when the wager is actually correct etc.

    It won't be the smartest AI, but many players probably won't notice that it's cheating.