Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Welwordion on October 12, 2005, 07:02:29 AM
-
What is .shflav and .shang
-
*.shflav returns the flavor of a shot that hits you. That is the value stored into .shoot to fire it.
*.shang returns the angle that the shot hit you relative to the absolute angle you are facing. So if a shot hits you from directly behind, *.shang will return 628
-
*.shang returns the angle that the shot hit you relative to the absolute angle you are facing. So if a shot hits you from directly behind, *.shang will return 628
???
why 628?
I have no idea why I question this other than my mind
equates 360 degrees with 2 radians, ie 6.28 ...
and 180 degrees (directly behind) with one ... ie 3.14
or is this 628 something completely different?
thanks ...
~griz~
not knowing enough yet to actually ask questions ...
so I thank you for your indulgence. ;)
-
DB radians use 200 * 2 * pi to represent a full circle.
Why? I dunno. That's how it was when I got here.
-
Always has been that way. No idea why. it just stuck
-
It does make a sort-of sense, since most values DB deals with are in the range +-1000
-
what is a flavor a could a shot return?
-
Could be absolutely anything
A typical feeding shot would return -1
A typical body shot would return -6
An energy shot would return -2
An information transfer shot could return anything depending on which memory location it was tageted at.
For example a shot that makes the recipient move backward (like those used by Preservans) would look like this.
.dn .shoot store
100 .shootval store
When this hits you, *.shflav will return 2
-
DB radians use 200 * 2 * pi to represent a full circle.
well ... good to know ...
may save me some headscratching at some point ...
not much hair left to pull out ... ;)
is there a tutorial/manual somewhere that explains
what the various DB commands are and mean?
~griz~
-
That's what the wiki is hopefully going to become.
In the mean time, there's a "help" file (limited) that comes with later versions of the program. And the "readme" for the latest versions usually documents new sysvars as they are added.
Other than that, the sysvars2.21.text file that comes with later versions contains all the sysvars the program has to use. Just scan it at some point and post questions about ones you see that make no sense to you.
There are less than 200 sysvars I believe, so it's daunting but not undoable to sort through them all.
-
There is a tutorial by PY on the downloads page thats worth a look
-
Yes, it's how I first learned the program, more or less.