How do I move my player without losing other sprites ?

0 favourites
  • 9 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Hi my name is Jazz813 and I have some troubleshots about my little project. First of all let's start from the beginning of my problem, I want to create a Game & Watch like game, I can move the player but in 5 differrent Layouts and here comes also my problem, here a picture from my game so maybe everyone can make a better image of the problem.

    So my problem is that when I move my player from left or right the birdscrap will disapear when the next frame jumps to the next Layout what's logical, I also tried to work with more Layer in one Layout because I think that if everything plays in one Layout it should work, but also there I encouted problems and it's when I tip it in the event sheet that the Player will move when I press the left or right button from the keyboard for example, it work for one frame but maybe I don't know the option to do it so , but I can't say the programm that if I press the left button anew the player move to the left agian and the last picture disapear...

    Could anyone help me on this problem ?

    Thanks very much

    Jazz813

  • Let me try to help.

    I don't think I understand it correctly, but for this game style, I think you could do something like this:

    positionNum, that can be 0, 1, 2, 3 or 4 (the number of images you have).

    positionNum = 2;

    Every tick

    • Set frame = positionNum;
    • sprite.set x = 300+(positionNum*1.2);

    if you press left, subtract 1 from positionNum (if it is higher or equal zero), same logic for right

  • Scofano's suggestion will work.

    Jazz813, you'll need to ether share your CAPX so we know what you're doing, or better define it.

    You'll need specific positions for each placement of the sprite, which I'm sure you know by now. If you're going to make a layout for each frame of the game, you'd need to create a layout for each possibility in-game, which is incredibly complicated, and a total waste of time.

    Also, if English isn't your native language, please include your native language, so we might be able to be of more help.

  • Ah ok yeah my native language is Luxembourgish but I can also speak German because no translater translate Luxembourgish correctly. So I write in German if I could.

    Ok, nun gut mein Problem ist halt dass wenn ich es nur in einem Layout erstelle das zukünftige Spiel, dann habe ich das Problem Construct 2 zu sagen dass bei jedem Klick auf die Tastatur zum Beispiel nach links die Figur einmal nach Links bewegt und die jeweilige andere Figur verschwindet.

    Und da Sie mir empfohlen habt auf einem Layout das Spiel zu erstellen hat sich das mit dem anderen also mit dem fallendem Mövenmist soweit erledigt, aber habe dennoch ein Problem und zwar mit dem fallendem Mövenmist, ich habe es zwar schon herausbekommen durch Physics, den Mövenmist zum fallen zu bringen doch ein gleichmässiges flüssiges Fallen ist nicht mein Ziel sondern so halt gestöckelterweise wie halt die echten Spiele von Game & Watch.

    Kann mir jemand da helfen ?

    Habe nämlich schon viele Youtube Channels nach Tipps und Tricks gesucht doch die Tips die ich bisjetzt so fand sind für flüssigere Spiele so wie Super Meatboy zum Beispiel.

  • Let me try to help.

    I don't think I understand it correctly, but for this game style, I think you could do something like this:

    positionNum, that can be 0, 1, 2, 3 or 4 (the number of images you have).

    positionNum = 2;

    Every tick

    - Set frame = positionNum;

    - sprite.set x = 300+(positionNum*1.2);

    if you press left, subtract 1 from positionNum (if it is higher or equal zero), same logic for right

    Ok it comes a little late but thanks for the tip but I have an other problem now or I'm just to dumb to see the solution right, I already found out with your tip that I need just one sprite with all the animation in it to animate the character, but I can't figure it out after I say to Construct 2 that he should turn the player one step to the left every time when I click to the left button, but maybe you could help me better when I show you my problem I dealing with.

    bilder uploaden

    Thanks very much if you could help me to clearify on that problem.

  • Dude, if you want the easy way, think about it like this:

    1---2---3---4

    The whole sprite is this long

    <----------------->

    and you check collisions using collision points. Why do you need to really move it around?

    Make a variable positionNum and subtract 1 when you press left and add 1 when you press right (since it doesnt get <1 and neither >4) and player.setframe = positionNum

    If positionNum =1 it will look like this

    <------------------> (this is the width of your sprite, with blank space, just use collision points to make it collidable where you want, each frame) and I think your problem is solved with 3 or 4 lines of code.

  • Ok thanks very much for your advise.

  • Not exactly sure what your player is doing but looks like you need a Wait in between changing your animation or you will never see the first animation in event 1.

    Rumble set Y = 712

    Wait 0.3 seconds

    Rumble set animation frame 2

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok thanks for the advise.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)