http://wiki.graal.net/index.php/Crea...ev/Old_GScript
Well, I mean, we got stuff like
NPC Code:
move dx,dy,time,options; moves the npc, options: cachtype(0,1,2) +
blockcheck(4) + eventwhendone(8) +
applydir(16)
...so I can figure out dx, dy is going to be something like -8, 0 for Move 8 tiles left, and time's probably going to be in seconds, so if you say 1 it'll move those 8 tiles in one second...
So what's cachtype 0,1,and 2? I imagine it's standard-issue binary, 0 means no cachtype, 1 means cachtype 1, 2 means cachtype 2, 3 means both 1 and 2...but what do they DO in vague terms?
Blockcheck 4, I imagine it detects blocking tiles - does it detect water? Chairs? Beds? Lava? Shallows?
Eventwhendone, I remember this being terrifically useful - but what event did it call? With what parameters/arguments?
Applydir? Will that turn the NPC automatically?
I'll grant, I could do some of this legwork myself, but EventWhenDone, that's infinite possible event-calls to detect for...
-5 minutes later-
It's a good thing I keep everything.
From NewFeatures2001.txt:
Quote:
Originally Posted by Stefan
There are also nice options to makes things very simple:
- cachingmode:
- 0: previous movements will be finished immediatelly
- 1: movements will be cached, the previous movements
will only be finished when the cache is too large
(distance to go >5);
this caching can be used on server-side npcs to
make the movement look like non-laggy even when
there are little delays sometimes
- 2: the movement will just be appended to the movement
list; you can add up to 100 movements
- blockcheck: add 4 to the options when you want the
npc to stop when there is a wall blocking the npc
- informmewhendone: if you add 8 to the options then the
script will be called with a 'movementfinished' flag
when the the npc has stopped walking; catch this event
with
if (movementfinished) {...}
if you want to do something when the npc has stopped
(e.g. walking in a different direction)
- applydirection: add 16 to the options if you want the
game to automatically set the direction of the npc
depending on the movement direction (can be good
when using movement caching)
|
I wonder if I have access to add the old NewFeatures to the Wiki myself...
Nope, sure don't. Oh well.