Droid problem solved


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Aristeus on January 09, 1998 at 20:33:28:

In Reply to: Re: Droid problems posted by CogKing on January 09, 1998 at 01:03:29:

> Could you post your full cog ? It is kinda hard to debug fragments of code...
> Also, tell me exactly what droid you insert (what template ? I need to also know
> its class cog)...
> -CogKing

Well, I suppose I COULD post the full cog, but it rivals kyle.cog in length,
and in the process of finding the templates you asked for, and a few
strategically placed PrintFlex(health) commands, I got it working. Thanks!

The problem was that the R5(class cog=actor_r5.cog) uses the _droidactor
template, which has 50 health. I was inserting the +r2r5_exp template, which
only does 10 damage. I also found out that I had been defining my me=
GetSenderRef() statement in too many places and it was returning -1 in
response to the DamageThing statement. I moved it so that it was defined
in the activated: message and it fixed the problem...then I replaced +r2r5_exp
with the template +sequencer_exp, which does 100 damage at ground-zero. It
blew the droid apart quite nicely, though I think I might change it to
+grenate_exp, which does only 75 damage with less concussion effect(the
first time I got this cog working, the droid literally flew across the room
and bounced off the wall when it exploded).

So anyway, those are the answers to your questions, and those questions were
enough to solve my problem, so thanks again. I don't know if there's an
interest for it, but I'm trying to create more interactive NPCs. I've got
the R5 working now, and previously I created a gonk that gives different
power-ups while living if Kyle hits spacebar next to it(it powers current
weapon). Only works once/minute like the 2-1B droid. I thought these
might be useful in SP levels. Each one only modifies it's respective
class cog(gonk = actor_go.cog, R5 listed above). I left them in cog form
rather than gob form so that they wouldn't interfere with all of those
players using the "I want to blow up everything around me at-a-glance"
patches out there. I'd rather stick with theme...you shouldn't have to
kill a power droid to get it to produce a little power every now and then.

To anyone else reading this: I alreay know that CogKing can make either of
these actor changes if he so desires, and probably with fewer code-lines
than I did it as well. But if anyone would like these, please email a
request to aristeus@rrnet.com and I'll send them in a reply as a zipped
attachment. If nothing else, it's a good way to see how to make an actor
do something when Kyle walks up to it and hits spacebar(compare the altered
versions with the originals in Res2.gob).


Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]