User Tag List

Results 1 to 9 of 9

Thread: Piranha Plant Movement

  1. #1
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Piranha Plant Movement

    Ill make a new post about this instead of continueing on my other.. Maybe other people will find this intresting aswell. I got some help from LB, and I dont wanna sound unthankful.. The fireball works great! Just the Pirana Plant had a few issues, and instead of hiding our chat in a unrelated thread, Ill make a new.

    A Pirana Plant is a plant from Super Mario.

    When he is moving, he moves up and down from the Tube. When he have reached the top he stays there for a little while, then goes down into the tube. And this is the movement. Also, if Mario is closer than X amounts of pixels (X coordinate), The plant wont come up, however if the movement is already moving, he will finish it.

    Does anyone have any ideas on how to make these events?

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    Test for the distance between X Mario and the X of the Pirana Plant to be greater than Y by using the ADO and doing Distance("Advanced Direction Object", X("plant"), 0, X("mario"), 0) > value

    Then do the movement actions. Basically the movement should probably be an animation, one that ends with a blank frame.

    EDIT: LB has the opinion that Abs(X("plant")-X("mario")) would be better. I think they are equal. Take your choice.

  3. #3
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    Yea, a min after posting this, I also had the idea by just making an animation, and not restart it before mario is X pixels away.. Ill try doing it on my own, but most likely Ill end up with the issue I always have.. Which ofcourse LB knows all about :p

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    How about this?

    Always: Set Player Distance (Alterable Value) of Pirana Plant to Abs(X("Mario")-X("Pirana Plant"))

    Player Distance of Pirana Plant is > 15 & Animation Chomp Chomp CHomp is over: Play Animation Chomp Chomp Chomp
    Working as fast as I can on Fusion 3

  5. #5
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    Gonna try in a few mins, gotta finish the animation

  6. #6
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    Can you be more specific on the animation event?
    I have
    Player Distance of "Pirana" > 50
    + "Pirana" animation "Stopped" is over

    = Start Animation


    I have the Always event.. Shall I set the animation on "Loop"?

  7. #7
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    Never mind, I found out myself Ill edit this post and explain what I did, incase someone else need it later Thanks LB and Ricky

    ------------- RESULT ---------------

    My animation contains 57 frames. Even tho, the last 10 frames are just blank (Its here the Piranha Plant is down in the tube).

    Always
    Abs(X( "Player" )-X( "Piranha" ))

    Alterable Value A of "Piranha" > 100
    + Current Frame of "Piranha" >= 56

    Start Animation

    Alterable Value A of "Piranha" < 100
    + Current Frame of "Piranha" >= 56

    Stop Animation


    To a noob like me, this are the events that makes most sense. I appreciate Ricky's help aswell, but it was a little more complicated, at least to a math noob like myself (I have not worked with MMF for a very long time).

    PS: Set each frame's Hot Spot thingie to the middle to make the distance on each side as correct as possible

  8. #8
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Piranha Plant Movement

    I would just do the reverse kinda. Give the piranha the path movement where i moves up and down again with a pause built into the path. Be sure to not make it repeat the movement. After it moves it will go into a stopped state. Then it is easy for you to test if mario is *further* away than the distance and if it is then start the movement again. Doing this probably only takes 2 events and gives you smoother movement than drawing an animation where it moves up and down.

  9. #9
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Piranha Plant Movement

    The first thing I did was also a path movement, but that "bugged" due to a specific reason. If I went futher into the frame, and I left the plant half way up or down in the tube, and then went back to the plant, the path movement started from that location until it had completed, and was then repositioned to its original place. But if you have enough frames, and the right programs, an animation like this works just fine Even tho I totally get your point.. It sure takes a lot of frames

Similar Threads

  1. Platform movement on Active objects using Nifflas' basic movement widget
    By ac3raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th October 2012, 02:16 AM
  2. Weird peranah plant problem
    By Appo in forum File Archive
    Replies: 2
    Last Post: 6th September 2010, 08:23 PM
  3. Mario Plant
    By FlinkGigitty in forum File Archive
    Replies: 2
    Last Post: 22nd August 2010, 01:50 PM
  4. Plant swaying motion, Grass moving
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th September 2008, 09:23 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
  •