It seems that I’m having trouble making an NPC follow the character. It just won’t run the loop (I-MARVIN), no matter what. I’m not exactly sure why.
For context, here is the code:
<GLOBAL PLUG-POINT <>>
<GLOBAL MARVIN-TIMES-FOLLOW 0>
<GLOBAL LIFE-PAIN 0>
<OBJECT MARVIN
(IN LOCAL-GLOBALS)
(DESC "Marvin")
(LDESC "Marvin, the Paranoid Android, is sulking.")
(SYNONYM MARVIN MARV ROBOT ANDROID)
(ADJECTIVE DEPRESSED SAD PARANOID MARVIN SULKING)
(FLAGS NARTICLEBIT PERSONBIT)
(ACTION MARVIN-F)>
<ROUTINE MARVIN-F ()
<COND (<NOT ,PLUG-POINT>
<I-MARVIN>)>
<COND (<EQUAL? ,MARVIN ,WINNER>
<COND (<AND <VERB? ASK-ABOUT TELL-ABOUT>
<PRSI? ,OBJECT-OF-GAME>>
<TELL "\"What's the point? Ugh. Life,\" he says,
\"don't talk to me about life!\"">)
(<VERB? HELLO>
<SETG WINNER ,PLAYER>
<PERFORM ,V?HELLO ,MARVIN>
<SETG WINNER ,MARVIN>
<RTRUE>)
(<AND <VERB? ASK-ABOUT TELL-ABOUT>
<PRSI? ,LIFE>>
<COND (<EQUAL? ,LIFE-PAIN 0>
<TELL "Marvin eyes you morosely, then goes on a
long tangent about life. You listen painfully, and when he is done,
your ears are stinging and your brain feels like it could implode." CR>
<INCREMENT-SCORE -20>
<SET LIFE-PAIN <+ ,LIFE-PAIN 1>>)
(ELSE
<TELL "You are NOT doing that again. Not even
funny. You decide to insult Marvin instead, who shrugs at your
comment." CR>)>)>)>>
<ROUTINE I-MARVIN ()
; "I literally added this in just to test that it will run. It doesn't."
<TELL "THIS IS A TEST" CR CR CR>
<COND (<NOT <IN? ,MARVIN ,HERE>>
;<COND (<NOT <G? ,MARVIN-TIMES-FOLLOW 5>>)>
<TELL "Marvin follows you.">
;<SETG MARVIN-TIMES-FOLLOW <+ ,MARVIN-TIMES-FOLLOW 1>>)>
<MOVE ,MARVIN ,HERE>>
By the way, you have a radio here (this is me working on the unfinished Milliways sequel) and a plant, and once you plug the plant into the radio, you set PLUG-POINT to true, and Marvin begins to follow you.