How do I: Destroy sprites partially?

0 favourites
  • 5 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • Hello everyone, I am one of the newest construct 2 users.

    My data:

    # laptop - Win 7, 64-bit - Intel i5 CPU, M480 2.67GHz - 4GB RAM

    # Construct 2, v1.84 (64-bit)

    # No programming knowledge

    _____________________________________________________________

    Is it possible to destroy sprites partially?

    Uses:

    1) fog of war (black sprite), penetrated by line of sight (white sprite), but remembering what the hero (sprite) has seen

    2) a big sprite of earth (solid sprite), then a digger (solid sprite) dig a tunnel through it, leaving the tunnel accessible to other sprites

    Because if not, I don't think I can create the game I want with Construct 2... T_T

    There may be a workaround for example 1, but not 2 (I think).

    Please help! Thanks for reading!

  • im nub at construct 2 but i think its not possible to destroy sprites partially.

    however

    2) you can create lots of solid sprite for your earth (just copy paste), the digger can dig a tunnel through it by destroying bits and bits sprites.

    http://www.scirra.com/arcade/addicting- ... sfarelante

    1) lol i dunno what you saying.

    i remembered last time i am pro at construct 2 and i did something like a knight holding a sword,

    i can easily destroy the sword only and not the knight. (but its more like 2 sprites instead of a total of 1 sprite.)

    basically, rather than partially destroying sprites, why not make more sprites and put them besides each other or even pin them together like my knight holding a sword then destroying them separately.

    instuctions on how to play on the above link to the game.

    (Movement Left Arrow or A and Right Arrow or D.

    Jump Up Arrow or W

    Bite Ctrl or O or P

    Pause ESC

    Dash 2x Left Arrow or 2x Right Arrow

    Turbo Drill - in the air press 2x Down Arrow

    Activate Specials L )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. This can be done with either:

    a. using a layer with "force own texture" set to yes, a black sprite covering it and sprites with the destination-out blend wherever you want to see through.

    https://dl.dropboxusercontent.com/u/542 ... rites.capx

    b. Using my Paster plugin to draw to a texture directly. The advantage over A is you can have more of a persistent fog without lots of destination-out sprites.

    https://dl.dropboxusercontent.com/u/542 ... aster.capx

    2. This can be done with a lot of sprites like foxrain4 said or you can use the tilemap objects for better performance although it becomes a bit more tedious to clear the terrain. A third option is to use my Canvas plugin to access pixel image data directly, but it will require much more effort since you'll have to make your own collision detection and response with pixels since C2's collision and behaaviors only works with polygons. Anyway here's a topic that links to a bunch of useful examples on the topic:

    how-do-i-manipulate-images_t115767?&hilit=terrain+destruction

  • I think you should use "animation frames" draw the images you want in a draw program of your choice and then run them as a animation on trigger. much easier this way.

  • Thanks for all the replies!

    I will look in to this the next days and see if I can make it work! Thanks especially to "R0J0hound" for the links.

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