User Tag List

Results 1 to 4 of 4

Thread: How to make a sprite scale and then disappear

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Mar 2014
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make a sprite scale and then disappear

    I am planning to make a little shooter game, but meet some problem. I draw a circle sprite and gave it 8 direction movement. And i create a sprite, when it collides with the shooter sprite, it gets bigger and disappear. It's some kind of effect but I plan to use event system to create it and learn the algorithm.

    My event: when sprite1 collides with sprite 2, set xscale of sprite 1 to xscale of sprite1 + 2. (quality = 1). By the way, not really understand the quality meaning =.=
    It turns out like the sprite just increase it size, but not an effect like getting bigger.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    You mean you want to gently increase sprite's size before destroying?

    try something like this:

    collision event
    >>> set alt. val. A of sprite to 1

    sprite alt. val. A > 0
    >>> add 0.2 to alt. val. A
    >>> set scale of sprite to Alt. val. A

    sprite alt. val. A > 4
    >>> destroy


    ah, the quality setting just means that "0" will do a "pixelated resize", without smoothing (anti aliasing) pixels, while "1" will

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Mar 2014
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey schrodinger, thanks for your reply!!
    I have tried your way and it works very well. Thank you so much.
    By the way, if you don't mind, can you explain why the way I used was wrong? I am kind of can't figure it out.. Sorry for inconvenience.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    no problem man!

    if you set something like:

    on collision
    >>> set scale to (xscale + 2 = 1+2 = 3)

    it means that in the occurrence of collision,
    sprite will instantly get three times its size

    while if we gently increase its scale:

    set scale to 1.2 -- 1.4 -- 1.6
    etc.

    we will see it growing smoothly

    we achieve this simply by adding 0.2 to an alterable value
    priorly set to 1 which is normal size
    and setting scale to this value

    then when size is big enough (i.e. > 4), we can destroy the sprite

    you can play with numbers,
    try changing the 0.2 to have different growing ratios,
    or >4 to destroy it when smaller or bigger

Similar Threads

  1. Replies: 2
    Last Post: 9th May 2015, 05:34 PM
  2. How do I make games scale to the window size?
    By 7cubed in forum Fusion 2.5
    Replies: 5
    Last Post: 28th June 2014, 05:07 AM
  3. Make a Sprite move between two points
    By WEich1213 in forum Fusion 2.5
    Replies: 7
    Last Post: 14th April 2014, 10:36 PM
  4. Rotate/Scale Sprite parts
    By Mycale in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 11th August 2008, 12:11 PM
  5. [SOLVED] click object to make it disappear
    By stillhawk in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 16th June 2007, 11:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •