Re: Question regarding NPC Positions

From: bruce (joshcrawford@YAHOO.COM)
Date: 12/07/97


---John Evans <evansj@HI-LINE.NET> wrote:
[snippy]
> No. The way you have stated that you are coding it, if someone gets
in a
> fight, their position shifts from POS_FLYING to POS_FIGHTING. That
means
> that they should plummet from the sky and bounce!
>
> Oh. But you'll say that no people that are fighting will fall because
> you'll give them the benefit of doubt and assume that they were flying
> before they starting fighting. That means that if I time it right and
> keep fighting when the computer checks to see if I am flying, I can
get
> _way_ up in the air without the benefit of a fly spell.
>
> Like I said from the start, AFF flags is the best way of handling fly.
> Check out waterwalk. Is there a POS_WATERWALK? No. There is an
affect flag
> for it because you are affected by a spell! The same goes with flying.
>
> But what about winged races? Well, to accomodate for those, I made the
> following macro (or something similar):
>
> #define IS_FLYING(ch) (IS_AFFECTED((ch), AFF_FLY) || \
>                        (GET_RACE((ch)) == RACE_BIRDMAN))
>
> And in my if statements, I use:
>
> if(IS_FLYING(ch)) {
> ....
> }
>
> Simple enough. No bother with positions or fighting the code to make
sure
> that someone's POS_XXX doesn't get mangled or messed up. Also. What if
> the fly spell wears off while someone is fighing? You'll probably
have to
> write some code to handle that.
>
> All-in-all, AFF_FLY is _much_ better than POS_FLY.
>
>
Thanks for backing me up, it's an old argument this one.

> Also,
>         You mentioned something about POS_SWIMMING. Why? If they are
in
> water, assume that they are swimming and go on.
>
He might want to add a 'swim' skill, not all your big, muscley
warriors can swim. But I'd still use an AFF_SWIM.

> John Evans <evansj@hi-line.net>
>
> May the source be with you.
>

==
<!-- I apologize for any formatting problems as -->
<!-- I am stuck using Yahoo! mail at the moment -->
<!-- bruce - bruce@audiophile.com               -->
<!-- http://www.AudioPhile.com/bruce            -->


_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST