User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Ugh....Another noobish question, Soz.

  1. #1
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ugh....Another noobish question, Soz.

    As an experience MMF2 user, I have never needed much help but this is a pretty noobish question. How would I make 4 different types of objects follow another in a straight line? I basically want a game were u can rescue people adn once you rescue them they follow you in a line. There are different types of people, therefore I have created them as different active objects. An
    Example will be the most anyone can give me here :P

    EDIT: Its like an angled top down game.

    Thanks

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    Active 2 = X Pos of Active 1 - 20
    Active 3 = X Pos of Active 2 - 20
    Active 4 = X Pos of Active 3 - 20

    Then just move Active 1 around. Should be pretty straightforward I think.

  3. #3
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    what events do I use..That wasn't really best described and Why only the X coordinate?

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Location
    Turku, Finland
    Posts
    1,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    Of course you would use both coordinates. I think that's pretty clear, you would use "always". I think that would look jerky though. Let me see if I come up with something.

  5. #5
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    Please read the edit. Its an Angled top down game.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    Ah sorry just assumed it was a standard side-view thing. Am at work at the moment so if Ravenius doesn't come up with anything i'll post something tonight.

  7. #7
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    steven that works but
    1. They arent in a straight line. cWell it depends. They don't really need to be in a straight line. At least bunched together as a group following the "Leader"
    2. The followers seem to overlap eachother and....Ok I just fixed that. I basically have them set in the bouncy ball movement and When they overlap the movement starts. I made them bounce if they touch eachother but it looks like they are jumping everywere. weird.
    3. When the leader stops, the followers bunch around it and start going crazy like changing direction and it gets worse because since I programed it so they bounce when they touch (So they wont overlap) They go even more crazy. It is very good but they bounce too much.

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    You can use distance formulae in an alterable value, to tell how far rescued object 1 is from rescued object 2, and so on.

    So you could do this:

    //Rename an alterable value in each of the followers to 'Distance'. So we can see at a glance what we're dealing with in the events.

    //Find the distance from each object to the one he'll follow.
    //This uses the x_distance² + y_distance² = total_distance² formula.
    //So if you times the X distance by itself, and the Y distance by itself, then add them together and find the square root of that number, then you have the distance.


    ALWAYS
    --- Follower A: Set 'Distance' to:
    sqr((x("Follower A")-x("Player")) pow 2 + (y("Follower A")-y("Player")) pow 2)

    --- Follower B Set 'Distance' to:
    sqr((x("Follower B")-x("Follower A")) pow 2 + (y("Follower B")-y("Follower A")) pow 2)

    ...and so on for each follower. So Follower A follows player, Follower B follows A, C follows B, and so on and so forth.

    //NOW DO THE FOLLOWING FOR EACH FOLLOWER OBJECT:
    //If the follower is miles away, he'll run quickly.

    Follower: Distance > '80'
    --- Follower: Set speed to 20
    --- Follower: Look at [object to follow]

    //If the follower is a little closer, he can slow down.
    Follower: Distance > '40'
    Follower: Distance < '80'
    --- Follower: Set speed to 10
    --- Follower: Look at [object to follow]

    //If the follower is very close, he can stop.
    Follower: Distance < '40'
    --- Follower: Set speed to 0
    --- Follower: Look at [object to follow]

    I don't really have time to make you an example, but hopefully that's enough for you to get the gist

  9. #9
    No Products Registered

    Join Date
    May 2007
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    There was a great example posted of this, it was like a final fantasy movement, the others would follow you at a certain distance. sorry i don't have a like for ya, but there IS a "follow" example out there...

  10. #10
    No Products Registered

    Join Date
    Oct 2006
    Location
    USA
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Ugh....Another noobish question, Soz.

    A couple years ago in TGF I did this type of movement for a Dragon Warrior Parody. I don't have the file, but I think I did it like this:

    Set the ACTION POINT of the Hero/Hostages several pixels behind the lead character. Have the rescued NPC "Always look in direction of 0,0 ACTION POINT of 'Hero'" and "Set speed to speed of 'Hero'". You can easily code it so the hostages start to follow in a chain. I had 4 characters follow around in a very realistic Dragon Warrior/Secret of Mana style.

    I dunno how well it'll work for your game, but it's a quick and dirty fix.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Noobish app build question...audio
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 8th May 2013, 12:55 PM
  2. 2 simple, possibly noobish questions!
    By Disthron in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th December 2012, 04:52 PM
  3. Noobish question about Lua and compatibility
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th July 2012, 06:42 AM
  4. Noobish question about angles
    By Jase in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th May 2011, 10:55 AM

Posting Permissions

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