WadaKatsu's Forum Posts

  • Hi, I'm a game designer for a big company.

    Although I worked on several AAA titles, I could never learn how to code stuff.

    I'm really terrible at math and everything that involves abstract languages, and even if I tried everything, from Unreal Engine to Unity, I've always gave up on them.

    But when I tried Construct I fell in love with it. It does more or less the same as other engines I've tried in the past but this time, he does it in human language. For the first time I felt like I could do a game on my own, from start to finish, and this is what I'll do, without having to rely to someone else as I normally do when I work.

    I'm not leaving my job, of course, I love it, but I think this engine will definitively improve my personal skills and allow me to reach goals that my innate aversion to coding always kept too far from me.

  • I think you need one more layer of logic. Let's replicate the mechanics of a button. Think of your button as having two states: 'down' and 'up'. When a player is overlapping your button, you want the button to be 'down'. When a player is NOT overlapping your button, you want the button to be 'up'. Let's put these mechanics in event form: add a Boolean instance variable to your button called "isDown". When Player1 or Player2 is overlapping Button, set isDown to True. If neither is overlapping, set isDown to False.

    Now we have a button that is either in a down state or up state (behind the scenes), depending on whether a player is standing on it. You want to link up your StartLava events to the state of your button. Basically, when the button is pushed (i.e isDown first becomes True), we want to toggle StartLava (set StartLava to 1-StartLava). To do this, we can use the "Trigger Once" condition. Our logic will look something like this: Button.isDown is True and Trigger Once, set StartLava to 1-StartLava.

    Now, every time isDown changes to True from False, StartLava will toggle. If a player steps on the button (changing isDown to True), and another player steps on it later (keeping isDown as True), because there was no change in button state, StartLava will remain the same, as you would like it to.

    EDIT: Or a simpler but conceptually similar approach would be: When either Player 1 or Player 2 is overlapping the button, in a Trigger Once SUBEVENT, toggle your StartLava variable.

    This should work similarly.

    Wow man you're amazing, not only this worked perfectly, but it's also far easier than all the solutions I tried before!

    Like you suggested, I set a boolean to the button that checks if it's currently pressed or not. This solved the two players problem, since if player2 steps on the button while player1 is already on it, the button remains "IsDown=True" regardless.

    After this, I've added an event which says:

    Button IsDown + Trigger Once= Set StartLava to 1-Startlava

    And bam, it now works perfectly.

    Thank you a lot!

    P.S. The "Set StartLava to 1-Startlava" you told me to use is amazingly smart and far better than the 2 events I used before ("if Startlava=0 > set StartLava to 1" + "if Else > Set StartLava to 0"). I still have to get in the correct mindset to use this program...

  • I've put a big red button on my local multiplayer game. If one of the two players steps on it it starts the lava which begins to fill up the stage. If the player steps on the button again, the lava stops flowing.

    To achieve this I created a global variable called "StartLava" and an event which says:

    Player1 or Player2 - On collision with Button = if StartLava is set to 0 (off), set StartLava to 1 (on)

    If Else, set StartLava to 0

    The problem is that the button is big enough to allow two players on it, and I don't want the lava to start or stop if a player steps on a button while there's already someone else on the button.

    I've tried adding events like setting the StartLava value to itself if a player collides on the button while the other is already on it, but they don't work, because the event described above always applies first, activating or deactivating the lava BEFORE checking if the button is already "occupied" or not.

    Thanks in advance, and sorry if this is a silly question.

  • In the 7th part of Ashley's "How to make a Platform game" tutorial, he demonstrates a great way of doing this:

    As you can read in my previous posts, that's what I did at first. It seems that the method described in that tutorial isn't very reliable when you just need the bounce effect, without actually killing the enemy (or, at least, it isn't in low-res pixelated games like mine).

  • Thank you so much, a picture is worth a thousand words!

    Thank you again, this is perfect.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ............

    Amazing thank you! That's not how the platformer tutorial nor the live twich lessons explained it... do you mind telling me what you exactly did? I mean, I've seen it but being the noob that I am I truly can't understand how you could fix it.

    For what I understood, the "is overlapping" command only works if the sprites aren't solid, how could they actually overlap each other when they are solid?

    Also, while this solution is incredibly close to be working, it's still possible to make one of the two aliens stop on top of the other's head. If you keep mashing the jump button while an alien is bouncing on your head, after a few tries you can stop him.

  • I'm sorry for this thread, I know this has been asked dozens of times already but even if I found several threads asking it, I couldn't find a solution for my issue.

    Also, please forgive me if this is something easy, I'm a total noob with construct. Please be patient with me.

    I'm trying to make a local multiplayer game in which jumping on the enemy's head makes your character bounce, without killing the enemy.

    I thought it was easy, I followed the "how to make a platformer" tutorial and used the same behavior it used to jump on the enemy and kill it, minus the killing part. I also removed the part that said "if the player touches the enemy at other angles he gets damaged", since I don't want that to happen. I just want to continuously bounce on the enemy's head when I jump on it.

    The point is that it doesn't work. The character just stays on top of the enemy's head.

    Here's my .capx, in case you have the time and the patience to help me (please).

    (https):// www (dot) dropbox (dot) com/s/98lfgvjyo5nrqud/ayy%20lmao.capx?dl=0

    Notes:

    -The grey alien moves with the directional arrows

    -The pink alien moves by connecting an xbox 360/xbox one controller and pressing "A" to jump and the D-pad to move

    -Being this a local multiplayer game I tried to make this behavior happen exactly the same way for both players

    -I tried using "on collision > compare y to player2's y" instead of "platform is falling" and while it seems to work better, at first, it gets randomly activated by simply touching the enemy, without actually jumping on him.

    -I also tried adding an invisible sprite to player 1's feet but the detection seems very imprecise, sometimes it works and sometimes the player just stops on the enemy's head

    Sorry again for causing trouble (and probably messing things up haha...) and thank you in advance for your help.