AAPTR_MINION
Moderator: GZDoom Developers
AAPTR_MINION
The companion to AAPTR_MASTER, allowing action functions such as A_GiveInventory when called by a master, to access its 'children'.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AAPTR_MINION
So, which 'minion'? Sorry, but since there is no guarantee what actor might get picked, this is mostly useless.
The AAPTR_ feature tracks specific pointers in the Actor structure and this has no corresponding element.
The AAPTR_ feature tracks specific pointers in the Actor structure and this has no corresponding element.
Re: AAPTR_MINION
(shouldn't it be AAPTR_CHILDREN?)
I would've guessed it to mean ALL OF THEM "everything that refers to the calling actor as master"
You could do some cool stuff with that... e.g. a boss, in its pain state, gives its spawns an item that triggers them to teleport randomly around it as a shield, or one of its attacks signaling them to self-destruct, or something.
I mean, we have A_Damage/Kill/Raise/RemoveChildren, so there's apparently some way for an actor to tell which actors are its "children" and then do something to them.
(similarly, AAPTR_SIBLING would look for anything with the same master)
I would've guessed it to mean ALL OF THEM "everything that refers to the calling actor as master"
You could do some cool stuff with that... e.g. a boss, in its pain state, gives its spawns an item that triggers them to teleport randomly around it as a shield, or one of its attacks signaling them to self-destruct, or something.
I mean, we have A_Damage/Kill/Raise/RemoveChildren, so there's apparently some way for an actor to tell which actors are its "children" and then do something to them.
(similarly, AAPTR_SIBLING would look for anything with the same master)
Re: AAPTR_MINION
Ethril wrote:I mean, we have A_Damage/Kill/Raise/RemoveChildren, so there's apparently some way for an actor to tell which actors are its "children" and then do something to them.
The functions you listed aren't pointers. APPTR_ obviously is a pointer. So no, it doesn't work.Graf Zahl wrote:The AAPTR_ feature tracks specific pointers in the Actor structure and this has no corresponding element.
Re: AAPTR_MINION
In that case, A_GiveToChildren or A_CheckChildInventory might be the better suggestion. Is that even doable?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AAPTR_MINION
A_GiveToChildren should be doable.
A_CheckChildInventory has the same problem as the original suggestion. Which child?
A_CheckChildInventory has the same problem as the original suggestion. Which child?
Re: AAPTR_MINION
The only way I think this could work is all or nothing, and that's not very useful when you potentially have a hundred actors to keep track of.Graf Zahl wrote:A_CheckChildInventory has the same problem as the original suggestion. Which child?
Would there be a way to check to see if at least one child has an item?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: AAPTR_MINION
Of course, but such a function still would be rather useless. We are entering WFDS territory here.
- AlphaEnt
- Posts: 105
- Joined: Fri Mar 13, 2009 9:45 am
- Graphics Processor: ATI/AMD (Legacy GZDoom)
- Location: Lost in Buenos Aires, Argentina I think...
- Contact:
Re: AAPTR_MINION
What about:Snarboo wrote:The only way I think this could work is all or nothing, and that's not very useful when you potentially have a hundred actors to keep track of.Graf Zahl wrote:A_CheckChildInventory has the same problem as the original suggestion. Which child?
Would there be a way to check to see if at least one child has an item?
A_CheckChildInventory ("specific child type", "specific inventory", inventory amount, "state")
btw, i've never used a children at all, so maybe i've said nosense.
I've just related A_CheckChildInventory with A_CheckInventory.
Btw, sorry for my english, GZ =P
Re: AAPTR_MINION
This is basically what I was interested in doing in the first place; parent actors giving stuff to child actors.Graf Zahl wrote:A_GiveToChildren should be doable