Results 1 to 4 of 4

Thread: Distance

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    115

    Distance

    CMB,

    I tried doing this, and got it ALL screwed up because I'm not clear on how you populate the listbox at the end. What I'm trying to do is to add a column to the table for 'Dist' which is simply the spawns x,y,z distance from to the player.

    All you have to do is compute the Spawn Distance (sd) as:

    sd = Math.sqrt(
    (si.X - mapPane1.map.playerinfo.X* (si.X - mapPane1.map.playerinfo.X) +

    (si.Y - mapPane1.map.playerinfo.Y) * (si.Y - mapPane1.map.playerinfo.Y) +

    (si.Z - mapPane1.map.playerinfo.Z) * (si.Z - mapPane1.map.playerinfo.Z)) ;

    and then format it as:

    item1.SubItems.Add(sd.ToString("#.0");

    I did this, but it simply didnt seem to put it in the table.... vewwy strange..

    I guess this ends up as a request

    R

  2. #2
    Moderator
    Join Date
    Jan 2003
    Posts
    426
    You've got to add another header to the listbox or it'll be hidden. I'll add this in though.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    45
    Originally posted by cavemanbob
    You've got to add another header to the listbox or it'll be hidden. I'll add this in though.
    How but an seperate box which shows experiance?
    Regular and AA?
    How much mana, food, ect.. stats? but mostly experiance?

  4. #4
    Moderator
    Join Date
    Jan 2003
    Posts
    426
    Yes all of those could be done, but I'm not doing them right now, first priority is getting the bits that are already in working properly before I add a bunch of new bugs. If someone else wants to give it a shot feel free, it'd be a lot of coding but not really all that hard.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On