Jump to content
Sign in to follow this  
TakanoFukada

Calculating actual distance travelled?

Recommended Posts

hihi,

i would like to do a script that calculates the actual distance travelled by a player. so even if he runs back where he came from, the figure of distance travelled will still go up. the result is returned by using addAction & hint commands.

as of now, i am not that well-versed in ofp scripting yet so i am unsure exactly which is the easiest way to do this... this is my concept...

1) set up a grid of triggers, each spaced 128m apart,  vertically & horizontally...

2) Actual distance travelled = 128 - ((nearestObj trigger) distance player)

i know the line above is 'incorrect' but i would just like to check whether this concept is feasible for implementation???

er... as mentioned, i'm not THAT familiar with scripting yet.. sad_o.gif so I have no idea how to use a 'nearestObj' to find the nearest trigger nor converting that array from 'obj distance player' into a number to fit the above equation. rock.gif can someone please help me on this part?

any other suggestions or recommendations are welcomed... would really appreciate it... thanks !  smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×