User Tag List

Results 1 to 7 of 7

Thread: Kirby Inhailing Enemies?

  1. #1
    Clicker Fusion 2.5
    darkmanx_429's Avatar
    Join Date
    Jun 2010
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Kirby Inhailing Enemies?

    I wanted to have a special attack for my player that pulls enemies towards the player. (Similar to how Kirby Inhales things from those games) How would I begin to code something like that for MMF2? Would I have to use box2d or can I straight use some variables in my code? Please be specific for me so that I may learn! Can someone with some knowledge help me?

    The effect would be similar to something shown here:

    http://www.youtube.com/watch?v=tYfO0iS5zaE

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by darkmanx_429 View Post
    I wanted to have a special attack for my player that pulls enemies towards the player. (Similar to how Kirby Inhales things from those games) How would I begin to code something like that for MMF2? Would I have to use box2d or can I straight use some variables in my code? Please be specific for me so that I may learn! Can someone with some knowledge help me?

    The effect would be similar to something shown here:

    http://www.youtube.com/watch?v=tYfO0iS5zaE
    That should be easy, though I haven't played the Kirby games, so I'll need you to answer a few questions:

    When the ability is used, do you just want the enemies to be moved horizontally (left and right) or do you want the enemies to be pulled towards the player vertically (up and down) as well?

    Should the enemies be affected by gravity while the ability is used?

    The video is kinda a little too vague to answer those questions, since the object is never inhaled in mid-air.

  3. #3
    Clicker Fusion 2.5
    darkmanx_429's Avatar
    Join Date
    Jun 2010
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by happygreenfrog View Post
    That should be easy, though I haven't played the Kirby games, so I'll need you to answer a few questions:

    When the ability is used, do you just want the enemies to be moved horizontally (left and right) or do you want the enemies to be pulled towards the player vertically (up and down) as well?

    Should the enemies be affected by gravity while the ability is used?

    The video is kinda a little too vague to answer those questions, since the object is never inhaled in mid-air.
    Yeah, up and down and right and left (subtle). As for the gravity the enemy would be light as a feather. Just imagine like a tornado, pulling debris towards it...that kinda of motion.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Okay. It's getting late for me (it's around 10:30 PM), so I'll make an example tomorrow (you might want to remind me via PM).

  5. #5
    Clicker Fusion 2.5
    darkmanx_429's Avatar
    Join Date
    Jun 2010
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Snail View Post
    I'm sure a mathematician could explain to you the various forces at work, but no, it isn't especially difficult to recreate something like Kirby in Fusion. Basically you want acceleration toward a center point (Kirby).

    If the distance of the enemy is within range of the inhalation, start accelerating the enemy toward the center point.

    For instance,

    Always
    -Set X of Active 2 to Alt. Value X
    -Set Alt. Value X to itself plus Alt. Value A

    If Active 2 is right of Active 1:
    -Subtract 1 from Alt. Value A

    If Active 2 is left of Active 1:
    -Add 1 from Alt. Value A

    (This will accelerate Active 2 indefinitely)

    That's basic acceleration toward a point. Minor modifications will give you what you're looking for.
    Thanks Snail! I will try this code, and then let you know the results! Keep the ideas coming people!

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Gravity has an inverse square relationship, so if you wanted something like that you could set the velocity to s/r², where s is a constant and r² is the square of the distance between the enemy and kirby. It will pull far objects slowly and near objects exponentially faster.

  7. #7
    Clicker Fusion 2.5
    Warmachine's Avatar
    Join Date
    Nov 2009
    Location
    Charleston, WV
    Posts
    664
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hey dude, try using scale and rotation. Make it so that when the inhale is happening every x amount of time the scale decreases and + or - the x position to give it the pull effect you need. That should work out fine

Similar Threads

  1. PMO for enemies
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th May 2011, 05:00 PM
  2. Enemies
    By WareWolff in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th June 2010, 06:48 AM
  3. thrown enemies not detecting other enemies
    By mobichan in forum File Archive
    Replies: 4
    Last Post: 8th April 2009, 06:40 PM
  4. Help with flying in Kirby game?
    By Amade in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 15th December 2007, 01:37 AM
  5. enemies
    By spartan117 in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 7th February 2007, 09:05 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
  •