RageByte's Recent Forum Activity

  • Just a question : when you write

    Pick Player where Player.UID != Player2[/code:2pasakqv] (on mouse click), it prevents player1 to attribute his controls to a character already selected by player 2. But shouldn't it also prevent from attribute several times the same controls to differents characters ? To make it clear, make this event possible only if Player.UID hasn't been set yet.
    I tried Pick Player where Player.UID != Player2 [b]&[/b] Player1, but it doesn't work.
    

    You could simply add "if Player1 = -1" on the first Mouse Left Click event and "if Player2 = -1" on the Mouse Right Click event and that way you can't choose 2 classes for the same player. But that's a very rudimentary selection process and I didn't pay much attention to it. Here is a better way to do the whole thing, though it uses Arrays and separate layouts - one for Player selection and one for the game it's self , like in plinkie's example. This way you can also have 2 or more players with the same class. Press a button and select the class. Then press Start to go to the Game layout or Reset to start the selection again.

    https://www.dropbox.com/s/6vyx7bt45op0z ... .capx?dl=0

    I still haven't added controls for players 3 and 4 so selecting them will spawn players but they don't do anything. Just add the token strings with the key-codes in the Controls variable of the Blue and Yellow buttons using this format "Left | Right | Up | Down | Something". You can find a list of keys and their respective codes on the web but if you're looking to assign game-pad controls to it I have no idea how because I never used that feature.

  • It works peeeerfectly !

    Now I can destroy my project and start again on solid bases. I already tested with platform behavior, and now all I have to do is add a real selection menu with nice portraits

    Thx x 1000.

    You're welcome, I'm glad you can use it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice control scheme RageByte with clever use of families.

    Thank you

  • Ok, I redid most of it. It does basically the same thing in a more flexible way and less events. It should even be more CPU efficient. This new design relies on text variables and the tokenat, tokencount and find expressions to search through, parse and manipulate the text. The point is to store and access multiple variables in a single text variable for higher flexibility. It's harder to grasp but I put a lot more detailed explanations in there. Hopefully they will help but as I said, feel free to ask.

    https://drive.google.com/open?id=0ByMnh ... 3dnNnBtNDg

    EDIT: I accidentally used the latest Construct beta r236 for this so you'll need that to open it.

  • I found a way to do this but it's still a bit bulky. I'll try to trim the script tomorrow but for now it still saves you the hassle of writing separate events for each player. Also it works pretty well. Left click to select player 1 and right click to select player 2. The first uses WSAD + space and the second uses the arrows and num zero. You could easily add as many players as you like provided you have enough keys for them.

    https://drive.google.com/open?id=0ByMnh ... 3dnNnBtNDg

    If you have questions let me know.

RageByte's avatar

RageByte

Member since 21 Sep, 2016

Twitter
RageByte has 10 followers

Trophy Case

  • 8-Year Club
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies