Path: chuka.playstation.co.uk!news From: Craig Graham Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Boundaries!!! Date: Sat, 31 Oct 1998 07:00:08 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 18 Message-ID: <363AB577.512BA1E5@hinge.mistral.co.uk> References: <363AA3F9.988C421E@aol.com> NNTP-Posting-Host: d3-s38-194-telehouse.mistral.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Omar Metwally wrote: > I tried to stop the sprites from going offscreen so I added this: > if (TestSprite.x <= (320-16) && TestSprite.y <= (240-16)) > > This (obviosly) did not work. Now please someone tell me what I am > suppose to do to make boundaries for sprites. Thank you very much. :-) if (TestSprite.x > (320-17) TestSprite.x=320-17; if(TestSprite.y > (240-17)) TestSprite.y = 240-17; Craig.