Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
manage objects automatically
#22
Quote:I noticed that when you create a bullet, you useĀ Father_getId to store the enemy sprite in the bullet. In a game there would probably be multiple enemies that appear and disappear constantly. In that case you would need a function similar to Father_getId that returns a list (an array) with all active sprites that use the specified id, and you would need to call it in the bullet's update function.


Can you show me what the code would be like, I can't get it to work.
Reply


Messages In This Thread
manage objects automatically - by aliensoldier - 11-11-2023, 07:01 PM
RE: manage objects automatically - by Marcus - 11-11-2023, 09:46 PM
RE: manage objects automatically - by Marcus - 11-12-2023, 09:10 AM
RE: manage objects automatically - by Marcus - 11-13-2023, 02:57 PM
RE: manage objects automatically - by Marcus - 11-14-2023, 04:30 PM
RE: manage objects automatically - by Marcus - 11-16-2023, 04:13 PM
RE: manage objects automatically - by Marcus - 11-14-2023, 07:47 PM
RE: manage objects automatically - by Marcus - 12-09-2023, 09:28 PM
RE: manage objects automatically - by Marcus - 12-18-2023, 04:08 PM
RE: manage objects automatically - by Marcus - 12-18-2023, 05:11 PM
RE: manage objects automatically - by Marcus - 01-18-2024, 04:49 PM
RE: manage objects automatically - by aliensoldier - 01-19-2024, 02:40 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)