Shay wrote:
>
> well, im still having this problem, but i got all the rest of the dg stuff
> to work.
>
> My problem is the sample trigger #2,
>
> #2
> mob greet test~
> 0 g 100
> ~
> if %direction% say Hello, %actor.name%, how are things to the
> %direction%? else * if the character popped in (word of recall, etc) this
> will be hit say Where did YOU come from, %actor.name%? end ~
>
> This trigger forces ME to say the line, and not the character, a cityguard
> in my case, to say the line. Anyone know where this is actually set off
> in the code? im probably just missing some code chunk somewhere, but im
> just not sure where that might be.
Hrmmm, looks like command_interpreter is being called with the actor
instead of the mob being passed as the character, this can happen from a
number of different places (note I'm referring to my own source which is
a significantly older and hacked-up version of DG Scripts, so YMMV)...
command_interpreter is called from script_driver in dg_scripts.c, the
line that calls it should look something like this...
command_interpreter((char_data *) go, cmd);
In the case of a greet mob trigger, script_driver is called from
greet_mtrigger in dg_triggers.c, look through this function very
carefully, the most significant lines are as follows...
trig_data *t;
...
for (t = TRIGGERS(SCRIPT(ch)); t; t = t->next) {
...
intermediate = script_driver(ch, t, MOB_TRIGGER, TRIG_NEW);
Look through the greet_mtrigger function very carefully (you may even
want to run the MUD in gdb and set a breakpoint for this function and
step through it while monitoring ceartain key variables)
regards, Peter
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 04/11/01 PDT