How do I need help

0 favourites
  • 9 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • paremeters for sprite: set animation it tells me im missing syntax . how do you know what your pose to type as your code ?

  • Have you read the manual ?

    [quote:hdixusfs]Set animation

    Change the currently playing animation to another animation. Animations are identified by their name (case insensitive). The new animation can either play from the beginning or from the same frame number as the last animation was on (current frame).

    In the parameter box it states:

    "The name of the animation to set"

    So if you have an animation called 'BossWalk' for instance, then you would set the animation name to

    "BossWalk"

  • I dont have any animations made I just have a basketball rim that I want to move left and right controlled by the player

  • So if you don't have an animation, why are you trying to set it and how do you suppose that should work?

  • I think you're confusing animations with movement lilvee1989 . What you want to do is use on key pressed(if you're making a game for pc) or on touch(if you make for mobiles).

    So in your case it would be something like

    Event: on left arrow pressed

    action: set basketball position to (basketball.x-20, basketball.y)

    Event: on right arrow pressed

    action: set basketball position to (basketball.x+20, basketball.y)

    Modify the 20 to whatever you want, depending on how far you want the ball to move. Hope that helps, if you have anymore questions let us know.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Vikings but in case I did do this on mobile can i actually have it where the player is moving the rim around with his thumb pressing on the rim image on the touch screen device instead of having control direction arrows displayed on the screen ?

  • Thanks Vikings but in case I did do this on mobile can i actually have it where the player is moving the rim around with his thumb pressing on the rim image on the touch screen device instead of having control direction arrows displayed on the screen ?

    Drag and drop behavior?

  • Thanks Vikings but in case I did do this on mobile can i actually have it where the player is moving the rim around with his thumb pressing on the rim image on the touch screen device instead of having control direction arrows displayed on the screen ?

    I'm sure you can, but I don't know enough about touch controls yet to advise you on how to achieve that.

  • You could either use the drag and drop behaviour as suggested above or create your own version of a drag and drop behaviour with set position and calculating offset between touch and origin..

    You should probably add some conditions to keep your sprite within the bounds you´d like, but it should be relatively easy to achieve..

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