User Tag List

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

Thread: help pls! how to control bouncing movement units distance from object (360)

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Aug 2015
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help pls! how to control bouncing movement units distance from object (360)

    im just discovering bounce movement is only way for simple manual movement controls in clickteam but im having trouble detecting obstacles (custom events yeah?)
    so how can i make a unit custom check a collision, distance from an objects points or hotspot to know to stop before reaching?

    i know you must log its x and y and check the other x and y but how does this look in math or clickteam? pathfidning is so hard in clickteam
    one eample by sprackman shows you make special walls that send you around them, i guess i can just pin these to objects on each four side...lol.... hmmmmm

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Aug 2015
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    :,,( pls anyone know? i wish to make a decent game but pathfinding is so difficult 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,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    mmmm....
    .......what????
    Can't get what you're after!

    You want to stop an object before it touches another?
    What does pathfinding has to do with it?

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Aug 2015
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually i need to rephrase my question since i think i figured out some of this already but im not 100% sure what i need.

    im trying to run for each on object (each object per frame) to check its distance from a target and stop from hitting it on either side (360 directions from the target object going outward to approaching ForEach object) to know when to stop so it can know how far from the center of the target to stop from. hmmmmmmm i have figured this out in some other engines but im not sure what to use in clickteam?

  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)
    I'm not sure I understood exactly,
    but if you want to check the distance from an object to another,
    you could just use the builting ODistance function
    (you find it in the expression editor under the object's "position" menu)
    it will ask you for X,Y coordinates of object from which calculate distance

    So you could test this distance on-each object, and stop them whenever this value gets below your minimum distance
    (this is a "distance" fomula, so you will always get a positive integer independently from relative positions of objects,
    I guess this is what you ask for when you say 360 degrees - outward distance from center)

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Aug 2015
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ill give it a shot, thanks alot

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Aug 2015
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i might as well just post the mfa, i cant seem to fdigure this out for a survival sim im trying to make:

    manual_pathfinding_broke_distance_check.mfa

    yeah its pretty simple now but distance check from nearby objects is how the inner workings of my pathfindings will work. i cant figure out A* scripting in clickteam so this is all i got. i will combine this with bounce movement on surfaces to decice collision detrection manually and functionaly since i have not trignometry skills.

    the event #26 is the one i tried with and without for each loops on pathing object, it only worked once and it wasnt for each and only on ONE. i dunno i must be doing this wrong.
    for each nesres path is not working for right now and ill figure it out later. (i got it to work once..)

  8. #8
    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)
    mmmm I'm sorry but I can't clearly argue what you're up to,
    you want the rectangular small things go upon the big square thing,
    when upon a certain distance?
    but you also want to do pathfinding because they will move in a world with solid obstacles?

    I can't think of a simple way to do pathfinding without implementing some more-or-less complex algorithm,
    any "corrected" bouncing ball, if not "tutored" by a series of hard-coded checkpoints, will easily end up sticking somewhere,
    blocked against a wall while heading toward its goal

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Aug 2015
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh no, i just want each object to search for juice nearest to them, store this fixed value of the nearest target (for each) and then head to there (by bouncing towards it)
    and then when a certain distance, i want them to know to stop from it (like 100 px away oranythin)

    pathfidning i figure out already (using directional marker chang) but just cant figure out how to make these for each loops not break

    oh sorry maybe the logic is set up for them to stop when on top, but i think i set it for stop when nearest to fix value targets any help is of great help! thx!

  10. #10
    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)
    Here's a quick way:

    1) prepare a couple of values for "object1", name them i.e. "distance" and "target"

    2) when you want to check for nearest juice:
    - set distance value of all "object1" objects to 999999 (a big value)
    - run a foreach loop on each "object1", name it "set_target" or similar

    3) on this loop (set_target),
    run another loop foreach "object2 (juice)", name it "find_nearest" or similar

    4) in this loop (find_nearest)
    store its fixed value and distance value inside object1 "target" and "distance" values,
    but do so ONLY if this distance < distance value of the object (the one we set to 999999 before).

    In this way, you will find in the end the nearest enemy (its distance value will be the smallest)
    and so at the end of the loop you'll have in "target" value of each object, the fixed value of nearest juice object.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. path movement player/object "bouncing"
    By CRKFIEND in forum Fusion 2.5
    Replies: 0
    Last Post: 29th December 2014, 01:06 AM
  2. Bouncing control
    By playdiune in forum Fusion 2.5
    Replies: 4
    Last Post: 25th November 2014, 05:36 PM
  3. Launch an object (How to control movement)
    By Puff_N_Stuff in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd January 2014, 02:21 PM
  4. Spaceship movement left and right trought bouncing ball movement instead 8 direction?
    By daryuss in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd May 2012, 09:33 PM
  5. Advanced Movement Object: Finding Distance
    By Gerblegod7 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th April 2007, 04:32 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
  •