well that broke, lets try with code tags -_-
First up, distance finding ^_^ I'm out to make a function that can return the distance (as one value) between 2 points based on an x/z axis (as the terrain for my game is always flat, y is not important). So something like Get_Dist(x1, z1, x2, z2) - Any ideas? I can of course compare the two x's and z's, but i figured I would have to combine them into one value some how.. like to adverage them or something.. or perhaps will just adding them together work? like a = x1 + z1, b = x2 + y2... and then something like if a > b then return a - b else return b - a... im not sure, my head hurts whenever i think about it for some reason -_- Guess im not having a good day! but just to calrify it would be used in this kind of way:
If Get_Dist(x, z, pointaX, pointaZ) < Get_Dist(x, z, pointbX, pointbZ) then go_to_point_a_its_nearer
this is for my ai routine to decide if a target is nearer ^^
About constants.. they dont seem to be working for me :/ Check this out:
#CONSTANT SHELL_TYPE = 1
Select WeaponType
Case SHELL_TYPE
do shell stuff
EndCase
EndSelect
That does not work.. but if i replace Case SHELL_TYPE with Case 1 then it DOES work.. -_- Also, pressing F1 on #constant causes the help system to error as it cant find the page *_* real annoying for me because i use constants ALOT in my programming :/
Anyone have any ideas about any of these two things? Thanks in advance for your time ^_^
(Sorry for broken first message, i hope the code tags fixed it)