animation bug?

  • Since your player has only one animation frame, you can set animation speed to 0 and add another frame.

    To change Player's appearance on collision with another object, just change its animation frame.

    Or if the object you are talking about is something like a new gun or a helmet, you can use Pin bahavior to attach it to the Player. Define different image points on the Player sprite where you will pin different items.

  • worked perfectly.

  • okay so i have another issue. when i touch the the object and change to shotgun the player changes but how do i then stop the previous bullets and spawn new ones from image point 2. problem is the image point 2 is on the shotgun frame not the player frame. any ideas?

  • To stop previous bullets - you can destroy them. However, since they are already fired, why bother?

    Is shotgun a separate object that you pin to the Player sprite? You can create a new image point on the Player for shotgun bullets. Or you can spawn bullets from the Shotgun object.

  • how do you pin the object? current;ly its a sprite and when you collide with it the player equips it (on different frame) same player but different frame so its all one object. the only difference is the shotgun powerup is seperate

  • Oh, so you are using my first suggestion, just switching the whole image of Player to another frame?

    Then it's even easier - you have your ShootPoint on frame #0 for pistol bullets.

    Create the same image point (same name and number, but on the tip of your shotgun) on frame #1.

    That's it, when you switch to frame #1, bullets will be firing from the ShootPoint defined on frame #1.

    You can do all this using pin behavior, it may be a better solution if your are planning to have lots of different guns, armor, backpacks etc.

    I added pinnable guns to your project, have a look:

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

  • thanks ill check it out

  • problem is that now when the game starts it just plays the animation and skips the main player to the shotgun player. how do i stop this and only change frame when i want it o

  • Set animation speed to 0.

    Have you tried my demo? There is a shotgun and an automatic rifle and you can switch between them

  • it wont let me. it says install the latest version of C2 but i already have it.

  • their is no option to set animation speed

  • it wont let me. it says install the latest version of C2 but i already have it.

    You can't have the latest.

    The example uses r244 Stable which is available from the footer of this forum or HERE.

  • I re-uploaded the game saved in your version (r244)

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

    To set animation speed, simply double click your sprite, there should be "Animation properties" toolbar in the left top corner of the C2 window.

    zenox98, I updated the file just now <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile"> Previously it was saved in beta version (246)

  • their is no option to set animation speed

    Two options - set animation speed via Events, or from the Image Editor, where the Animation speed is one of the Properties in the Properties window on the left.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, OK

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