hover, check, add subtract, destroy sprites undern

0 favourites
  • 5 posts
From the Asset Store
Customize the animation of character when item changed
  • I wanna make part of a game that while your hovering over an area with you mouse it will display a several of the same sprite in a row but each are a different animation. When one of them is clicked it will check to see if the player has enough points/resources and then check to see if that's the correct choice. If not one or more will be taken away, reducing the player resources, and that sprite animation disappears. If so a point/asset will be given increasing a value/resource, and the rest of the animations in that hover area, including the ones behind the animated sprites, disappear revealing what is underneath. I want the player to be able to hover, click, fail, hover elsewhere, comeback and try again if desired.

    I'm new to construct and I haven't gotten much setup yet so if I should have something like an array or instance thing or global variable etc I need to know. If you know of tutorial/s that would help that would be really helpful.

  • When one of them is clicked it will check to see if the player has enough points/resources and then check to see if that's the correct choice. If not one or more will be taken away, reducing the player resources, and that sprite animation disappears. If so a point/asset will be given increasing a value/resource

    What do you mean by "the correct choice"? And you seem to be using the term "resources" and "points" in different contexts, could you please make it a bit more clear?

  • What do you mean by "the correct choice"? And you seem to be using the term "resources" and "points" in different contexts, could you please make it a bit more clear?

    Sure. The Player will have a sort of inventory, example: Happy Faces = 1, Normal Faces = 3, Angry Faces = 0. In the hover area if the player clicks on the Angry Face to try and place his own he can't because he has 0, if he clicks on the Happy Face if correct he uses up his Happy Face(setting his inventory of it to 0) but gains either a Normal, Angry, or even another Happy face and destroys everything in the hover area revealing the contents(having been covered up by other sprites) for the player. At some point in the game(end of page 11 since its a comic) it will add up the remaining total in the inventory for score.

    After I learn how to do this I want it to be able to destroy sprite objects elsewhere that aren't in that particular hover area unlocking pages, secrets, and other areas.

    At the moment I have the same sprite object holding all the different animations or Happy, Normal, Angry, etc if that matters.

    Heres the .capx file of the comic game I'm working on, it has a few noticeable bugs already. https://www.dropbox.com/s/xfqzwlhos8ja7em/LL%20Game.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Something like this?

    HoverMenu.capx (r99)

  • Very close. The Sprite has multiple animations with multiple frames for that animation(ex: Happy has 3 frames, Normal has 3, Angry has 3). When one is clicked that animation is destroyed because the player tried that one and it wasn't correct, so he can't choose it again.

    I was also planning on their are multiple faces for the game(ex: Alex, Tommy, Jason, etc) so this structure probably wont work for that, or at least easily.

    I worked on it some more but it would be a lot of coding doing it this way but its closer to what I had i mind.

    HoverMenu.capx (r99) - almost got it

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