playMaker

Author Topic: [SOLVED]Multi-distance comparisons  (Read 2289 times)

choi

  • Playmaker Newbie
  • *
  • Posts: 40
    • View Profile
[SOLVED]Multi-distance comparisons
« on: November 07, 2012, 08:29:07 AM »
Please help me.
1) Six Ball.
2) One of the targets.
3) Active Ball for farthest from the target.
4) Add Force.
« Last Edit: November 08, 2012, 06:47:15 AM by choi »

Red

  • Hero Member
  • *****
  • Posts: 563
    • View Profile
Re: Multi-distance comparisons.
« Reply #1 on: November 07, 2012, 10:11:24 AM »
umm, your post isn't as clear as i think it could be... but i'll see about giving it a stab (if it's a language barrier, please forgive me.)

first thing i'd probably do, and this is assuming that there will only ever be 6 balls in the scene is to set up an FSM with 6 gameObject variables and have each ball placed in them... from then you can use the "get distance" actions to calculate the distances between them... it'd be a beefy state though seeing as to get all the distances from each will be about 30 of them (so, distance from ball a to b... distance from a to c... distance to a to d... distance to b to c... etc...)

as for the adding force, not sure which one you mean... so, a little more clarification would be ideal... if it helps, try and just write out what you want it to do (eg: "I want the furthest ball from the 'active' ball which i will set as the active ball to have a force attached to it to make it go upwards when i do 'x'" where 'x' is a particular action you want the player to perform or a particular set of conditions to be met.)

if you want to have it all dynamically set up in an array system, JeanFabre's "ArrayMaker" might be worth checking out... this would help if you have the scene having more balls being added as the game progresses or removed as the game progresses... so as to retain some dynamic asset management in there... i'd post some suggestions but i'm still learning that set of actions myself.

choi

  • Playmaker Newbie
  • *
  • Posts: 40
    • View Profile
Re: Multi-distance comparisons.
« Reply #2 on: November 07, 2012, 06:33:22 PM »
Thanks for your help.

I'm making a game of golf
Played by six players.
At the top of the list of the best long distance athletes in the hole cup.

Distance calculations were done.
Only carry multi-comparison and thus an event occurs.

How should they?
« Last Edit: November 07, 2012, 06:44:00 PM by choi »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14593
  • Official Playmaker Support
    • View Profile
Re: Multi-distance comparisons.
« Reply #3 on: November 08, 2012, 03:56:38 AM »
Hi,

 ArrayMaker can do that distance sorting, I made an example a while ago actually:

http://hutonggames.com/playmakerforum/index.php?topic=1382.0

 If you have any questions, let me know.

bye,

 Jean

choi

  • Playmaker Newbie
  • *
  • Posts: 40
    • View Profile
Re: Multi-distance comparisons.
« Reply #4 on: November 08, 2012, 06:44:16 AM »
Good!
Thank you.
I think I know.

choi

  • Playmaker Newbie
  • *
  • Posts: 40
    • View Profile
Re: Multi-distance comparisons.
« Reply #5 on: November 08, 2012, 06:45:09 AM »
Hi,

 ArrayMaker can do that distance sorting, I made an example a while ago actually:

http://hutonggames.com/playmakerforum/index.php?topic=1382.0

 If you have any questions, let me know.

bye,

 Jean