User Tag List

Results 1 to 8 of 8

Thread: Character to move around a shape

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,061
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)

    Character to move around a shape

    I'm trying to make a character move around a shape (example file attached).

    The shape will change on each level.

    The character can be placed anywhere on the shape. The player picks him up and places him where they want as long as it is on the shape.

    Later on he can also turn off from one shape onto the next shape – he'll also be interacting with lifts / switches etc. so it won't just be moving in circles.


    Path:
    I wanted to use the path movement but I saw after playing with it that the path is drawn from where the player is placed – instead of continuing on from the nearest node.
    I'm giving the player 3 speed options which is important and I couldn’t find a way of changing the speed of the path mid-game. As far as I could determine from a forum search you could only do that by manually changing the speed of the nodes in the path setup procedure in which case the path-option isn’t going to work.

    Place-markers:
    Another way was to create place-markers along the route and then having him move from place-marker to place-marker and I’d have to somehow calculate the angle and direction from one place-marker to the next place-marker. This seems like a huge task to do something that should be simple, but I’m not sure if I can do this any other way.

    Does anyone have any ideas of what would be the best way of achieving this and are there other options I should explore rather than these two?

    Thank you.
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    amiman99's Avatar
    Join Date
    Dec 2015
    Posts
    242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a problem with path movement too, so one of the member created a movement between markers, check it out in Post #5

    http://community.clickteam.com/threads/96576-Path-object-problem-when-deactivating-group

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,061
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    Thanks amiman99 I played around with the example from Schrodinger and it works but -

    If you're not placing the character directly on a marker (node) then he is going nowhere.

    If I force the players to place the character on a marker I either have to place a lot of markers or it will make the game too easy.

    If my markers aren't evenly spaced I don't know how to calculate his initial direction.

    When I get to having 11 characters and 11 patterns this method is going to require 1000+ markers that I'll have to place and I'm not sure how Fusion will handle 1000+ markers.

    In addition my final character will be animated and I'd like him to change his angle of movement. (The auto-rotate inside fusion gives a rubbish result.)

    I've attached a sample.
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,061
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    I managed to find a work-around using Schrodinger's example and playing around with it - I've attached a very basic example just to show the code I'm using.

    But now a problem has cropped out and I have no idea how to solve it.

    1. As you can see from the example the players cut corners - the way I'm telling it to loop is when you get to the last number start again. But the minute it is seeing that code it aims for the 1st number, when it should only do that when it reaches the last number. I can solve this by the way I place the markers or adding in an extra marker. But if anyone has an idea how to solve this without using a work-around that would be great.

    2. This is a more serious issue that I can't figure out. As my boards become more complex and I put more players into it I'm finding odd behaviour. If I place a player on marker 17 and there is marker 16 and marker 18 around it - it will go to marker 16 and not marker 18. I've checked that the space of 18 is closer than the space of 16 but this doesn't seem to affect it. It's only happened twice, but I suspect it will happen more often as I carry on. Once I get that error, it will happen every time - i.e. on that particular board if I place my player on marker 17 it will 100% of the time first go to 16 and then at 16 turn around and go 17, 18, 19 etc. I've checked that the marker numbers and values are correct. If I place the player somewhere else i.e. on marker 14 then it will follow the route correctly, it only messes up when it is placed on marker 17. (On another board it only messes up on marker 13!)

    As you can see from the example there is a lot of overlap and crossing of markers and marker numbers but I had no problem with that until the point where I added a 6th player and where I've placed a lot of arrows into the board where I'm constantly changing the marker numbers. But this error will happen even before the player reaches the first arrow and only will only happen to 1 player on the board and that player and marker has 30 levels before where it worked perfectly. The players have no interaction with the markers of the other player and I've had no errors there - i.e. the confusion has only been in their own marker range.

    (The attached example is a primitive version of the actual game just isolating the movement with make-shift graphics - help yourself if you want any of the graphics used in it.)
    Attached files Attached files

  5. #5
    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)
    Is this correct?

    MovementC_1.mfa

    For the yellow path, you have some "special cases" you have to address individually,
    and be cautious when correcting the "marker" value of player,
    since you can easily come to undesired results if you don't take into account all possible situations
    tricky thing but doable

    fun concept!

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,061
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    Thanks schrodinger - you solved part of the problem - thank you so much! (You'll be my hero soon as Bugs Bunny dies!!!)

    In your example:

    1. Solved -the player no longer cuts corner.

    2. Solved - If I place the player on marker 9 then instead of going on to marker 3 it will go to marker 10. But in this simple example it was clear to me that the code of adding 1 was triggering ahead of the code where I was allocating the marker number - so I just re-arranged the code and that solved the problem perfectly.

    But now:

    The arrow on the left "arrow left 1" the yellow player now follow it once or twice and then on the 3rd time it will ignore it and go straight up. (That's new, I haven't had that happen before.)

    It's spooky - the code is right there, I can see it, it works ... and then it doesn't ;-)

  7. #7
    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)
    It has probably to do with the "distance" from arrow being too short
    (I added that bit because the overlapping was triggered a bit too soon in my taste )
    try setting to 12-14 instead of 9 (line 18)
    or removing completely the "odistance" condition, so it would be just like your starting (working) example

    for something more precise you could use angles instead of directions and a custom movement
    but it's a bit more code to add in there

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,061
    Mentioned
    171 Post(s)
    Tagged
    0 Thread(s)
    I saw that removing the Odistance condition solved the problem.

    I don't have many straight corners in the actual game and in one or two places where the "slide" in the arrow was too noticeable I put in a soft corner - something like a triangle in the corner instead of a straight corner to disguise that.

    I don't mind extra code though and precise movements always look better but I haven't studied angles in + - (way too many years) and never in English, so I struggle with it now.

    Thank you very much. I really appreciate your help.

Similar Threads

  1. character disappearing when I move left
    By ShadowSpark in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th June 2014, 07:55 PM
  2. How to move character!
    By Keli in forum Android Export Module Version 2.0
    Replies: 6
    Last Post: 30th April 2013, 08:07 PM
  3. Click the mouse and move character?
    By m00nbeam360 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th July 2012, 05:11 PM
  4. Character move 50px
    By tekila in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th September 2011, 04:50 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
  •