Article View: alt.games.unreal.tournament
Article #179077Re: Catch the Chicken 0.0.8
From: {AGUT2}MeltDown
Date: Thu, 10 Jul 2003 10:59
Date: Thu, 10 Jul 2003 10:59
35 lines
2605 bytes
2605 bytes
Robert Mischke enlightened us with:
> After what I've read, I'm a bit surprised this compiles at all,
> because "Inventory" is a class, and not a property?
It's both. In UnrealScript, you can have a class and an instance with
the same name. You see things like that in Epic's code all the time:
simulated function DrawOverlays(Canvas Canvas);
for instance.
> I guess "someone" is of the "Pawn" class, as the bots will want to
> look for the chicken in both players and other bots. So maybe what
> you're looking for is the Pawn::FindInventoryType function (see
> http://wiki.beyondunreal.com/wiki/Pawn_(UT)/Inventory for a list). I
> guess this code should do what you want:
I've tried that too, but that would cause some nasty loops with other
things calling hasChicken() from their FindInventoryType() function.
If you take a look at the FindInventoryType() function of a pawn, you'll
see that it's just the loop with I=I.Inventory as the iterator. It's the
Unreal way of handling an Inventory chain.
The problem with the chicken is probably that the inventory chain is
looping somewhere. Perhaps I should keep a list of 'already passed'
actors, and detect a loop myself. Perhaps I can find out what's going
wrong that way. On the other hand, simply logging every object in the
loop will give me that insight as well.
MeltDown
--
For all your UT2003 questions visit http://www.unrealtower.org/faq.php
Military intelligence is a contradiction in terms.
If you /have/ to use Outlook fix it: http://flash.to/oe-quotefix/
Technical Details
Message-ID:
<slrnbgqhp8.4jd.meltdownUSE@sybren.thirdtower.com>Path:
mbox-mo1.pugleaf.net!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!news.maxwell.syr.edu!skynet.be!skynet.be!transit.news.xs4all.nl!not-for-mailReferences:
<slrnbggrv0.qk.meltdownUSE@sybren.thirdtower.com> <1ijjgv004ffn6knpg14s1vp0h2narrpv98@4ax.com> <slrnbgjsrs.r4.meltdownUSE@sybren.thirdtower.com> <3f0e1970.2982200@News.CIS.DFN.DE> <3f0f204e.4740657@News.CIS.DFN.DE>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!feed2.news.rcn.net!rcn!news.maxwell.syr.edu!skynet.be!skynet.be!transit.news.xs4all.nl!not-for-mail
Newsgroups: alt.games.unreal.tournament
From: {AGUT2}MeltDown <meltdownUSE@YOURunrealtower.imagination.org>
Subject: Re: Catch the Chicken 0.0.8
References: <slrnbggrv0.qk.meltdownUSE@sybren.thirdtower.com> <1ijjgv004ffn6knpg14s1vp0h2narrpv98@4ax.com> <slrnbgjsrs.r4.meltdownUSE@sybren.thirdtower.com> <3f0e1970.2982200@News.CIS.DFN.DE> <3f0f204e.4740657@News.CIS.DFN.DE>
X-TheAnswer: 42
Message-ID: <slrnbgqhp8.4jd.meltdownUSE@sybren.thirdtower.com>
User-Agent: slrn/0.9.7.4 (Linux)
Date: 10 Jul 2003 10:59:52 GMT
Lines: 35
NNTP-Posting-Date: 10 Jul 2003 12:59:52 CEST
NNTP-Posting-Host: 80.126.213.162
X-Trace: 1057834792 news.xs4all.nl 49116 80.126.213.162:32804
X-Complaints-To: abuse@xs4all.nl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit