[DECORATE] Some Inventory Code Pointers

Moderator: GZDoom Developers

Post Reply
User avatar
Slasher
Posts: 1160
Joined: Sun Mar 16, 2008 11:17 pm
Location: California

[DECORATE] Some Inventory Code Pointers

Post by Slasher »

This idea came to me when I was trying to create an actor that spawns other actors that fight alongside it. I wanted to make sure it couldn't spawn more than 4 "offspring" at a time, but if one died, the monster would be able to spawn another one, again for a total of 4.

Anyway, to monitor this I thought about using a simple inventory item that is given to the parent actor, up to 4, so it knows how many have been spawned, and when one dies, take away one of the items. That's when I realized that I didn't know how to tell the offspring to remove the item from the inventory of the parent.

Therefore, my suggestion:

Code: Select all

A_GiveToMaster
A_TakeFromMaster

A_GiveToChildren
A_TakeFromChildren
And with these comes many new possibilities for more interesting actors and stuff.

So what do you think? Is this doable?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: [DECORATE] Some Inventory Code Pointers

Post by XutaWoo »

I already asked this. It got WFDS'd.
User avatar
Slasher
Posts: 1160
Joined: Sun Mar 16, 2008 11:17 pm
Location: California

Re: [DECORATE] Some Inventory Code Pointers

Post by Slasher »

It did? Why though... It would need to know the parent or child of the actor calling the pointer, and that information must be collected in order to use the other master/child codepointers right?

Eh, what do I know? I don't know the source code, so if it gets WFDS, so be it.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”