What language are you using? If it is BGT, the array class has methods such
as remove_last, remove_at etc which will do what you want. Other programming
languages have equivalent containers, such as C++ vector or list.
Kind regards,
Philip Bennefall
----- Original Message -----
From: "john" <[email protected]>
To: "Gamers Discussion list" <[email protected]>
Sent: Friday, August 23, 2013 10:22 PM
Subject: Re: [Audyssey] looking for some programming help
Basically, I've written a class ship, and declared an array of
them; one for friendly and one for enemy. I'd like to know how I
can make the ship disappear when it's destroyed.
----- Original Message -----
From: Cara Quinn <[email protected]
To: Gamers Discussion list <[email protected]
Date sent: Fri, 23 Aug 2013 13:15:17 -0700
Subject: Re: [Audyssey] looking for some programming help
Hi John,
How are you adding your entities into the game? Do that in
reverse. :)
I'm actually not trying to be snarky here, :) I just can't give
you a better answer until I know both the language you're using
and your method for creating your entities in the first place.
Know what I mean?
If you can send along a bit more detail I can give you a better
answer. Essentially though, you want to nullify your entities.
-Return everything about them to the state they were in before
you created them. Depending on your language, this may be
deleting them, setting them to nil, reseting variables about
them. etc. Also, if you want to keep them around for reference
but not have them actually in the game, you can do that too.
If you'd like to send more detail, then please do. :)
Have a great day!
Smiles,
Cara :)
---
View my Online Portfolio at:
http://www.onemodelplace.com/CaraQuinn
Follow me on Twitter!
https://twitter.com/ModelCara
On Aug 23, 2013, at 12:33 PM, john <[email protected]>
wrote:
Hi all,
I've finally gotten the general infrastructure of a game
started, but I've run into an issue with my enemy class. Namely,
once the enemy is defeated, I have no idea how to remove it from
the game. Could anybody give me some examples of how you handle
removing ememies and items from play?
Thanks,
John.
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to
[email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of
the list,
please send E-mail to [email protected].
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to
[email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of
the list,
please send E-mail to [email protected].
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to
[email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].