User Tag List

Results 1 to 8 of 8

Thread: Second character following current selected character?

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jun 2014
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Second character following current selected character?

    I'm currently working on a small platforming game with one of the mechanics being switching between the two characters the player is given, each with their own strengths and weaknesses (pretty standard fare I know). However, I need the current secondary player to tail the current primary character with a bit of a lag and make sure they will stay behind the primary character. The best analogy I can think of for this is Kirby, where you can absorb an enemy and then create an ally that tags along behind you. If anyone can possibly point me towards a tutorial, already implemented feature in Fusion, or give me a tutorial themselves that would be amazing.

    Thanks and appreciation in advance.

  2. #2
    Clicker Fusion 2.5

    Join Date
    Jun 2014
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Edit: I've now realized I also really need help with creating a custom control for switching between two characters. I thought I would be able to do it with event behaviors for objects, but I've failed on several attempts to use those or even the regular events screen for a frame. If there's any way to implement a control, aside from what can be assigned in active object movement properties, that can be activated at any time I would be incredibly grateful to anyone who can point it our for me.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Here's an idea:
    double_players.mfa

    Second character follows first after a specified lag period that you can customize in global value
    This value will decrease dynamically in order to avoid stopping at mid-air while following the path.
    You can switch player control with the "switch" button
    (to simplify things, all characters gets repositioned one above the other on switching... otherwise we would need a new not-recorded path)

    Platform detector is used to record wether the player's position is in mid-air or not.

    Optimization would require recording "alteration in movements" in the array instead of raw X/Y positions
    (start point --> speed --> end point) just like vectors,
    in order to keep the array small and drastically lower the number of updates
    but this may be already a start...

    Advantages of this method (recording your main player's movement and replicate it)
    is that what you can do is forcedly legit, and so the computer will also follow legit paths.
    Other methods can be simpler/smoother, but would probably require having a "super" second character, passing through obstacles, flying...

  4. #4
    Clicker Fusion 2.5

    Join Date
    Jun 2014
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much! It'll take me a bit to figure out the example you gave me, but I'm sure it will help me get along with my game.

  5. #5
    Clicker Fusion 2.5

    Join Date
    Jun 2014
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So I actually do have a question about the file you gave me, about Group.Player. I have no idea what this object is, and I can't find it anywhere in the objects list or events list. Is this some sort of extension, or how would I find it in the studio?

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    It's a qualifier. Qualifiers group items together so it's easier to apply code to multiple actives at the same time for example. Click on an object and check the properties window. One of the last few tabs should have a line that says Qualifier. Click the edit button next to it to add a qualifier to it. For the example above the person added the "player" qualifier to the actives.

  7. #7
    Clicker Fusion 2.5
    Bertard's Avatar
    Join Date
    Jan 2014
    Posts
    150
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For a rpg you should to use a detector

    When X("Second toon") < X("Detector") => Set X("Second toon") to X("Second toon") - 1
    X("Second toon") > X("Detector") => Set X("Second toon") to X("Second toon") + 1
    Y("Second toon") < Y("Detector") => Set Y("Second toon") to Y("Second toon") + 1
    Y("Second toon") > Y("Detector") => Set Y("Second toon") to Y("Second toon") - 1

  8. #8
    Clicker Fusion 2.5

    Join Date
    Jun 2014
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I checked out what you said, and was finally able to apply @schrodinger's example to my own game, thanks!

Similar Threads

  1. Replies: 1
    Last Post: 23rd July 2015, 08:33 PM
  2. [RC2 Bug]Ini. Set current file contains character of "/"
    By kusa in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 10th November 2012, 03:10 AM
  3. Character Image: Load Character Images from Folder
    By aidmm in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 9th May 2011, 06:56 PM
  4. CPU character
    By clim in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd March 2011, 01:12 AM
  5. Character Name
    By Yada in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th March 2008, 09:48 PM

Tags for this Thread

Posting Permissions

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