[WFDS] Pointer to spawned actor (A_SpawnItemEx)

Moderator: Developers

Pointer to spawned actor (A_SpawnItemEx)

Postby FDARI » Tue Mar 22, 2011 5:56 pm

I wish to discuss a possible feature. I'll readily write the code for it later, if there is any chance that it will be accepted. (Provided that it does not turn out to be overly difficult afterall.)

Sometimes you wish to interact with a spawned actor without rewriting the spawned actor to accomplish this. For general-purpose creator-creation design, the creator will need a reference to its creation. This also allows operations to be performed on the spawned actor before it can possibly carry out any of its own action pointers, as even an opening set of two 0 tic states does not execute action pointers immediately. (There may be reasons not to allow this, but I don't know any.)

Flags SXF_MAKETARGET, SXF_MAKEMASTER, SXF_MAKETRACER.

SXF_MAKETARGET: Sets the spawned actor as target, applying safeguards against infinite loops for missile ownership.
SXF_MAKEMASTER: Sets the spawned actor as master, not compatible with SXF_SETMASTER. Effective only when both actors are monsters.
SXF_MAKETRACER: Sets the spawned actor as tracer, unconditionally.

Peril: Even more manual pointer management. I like it, and work hard to do it without these functions. Modders who previously didn't know how to crash ZDOOM will now have more tools at their disposal.

Advantage: You can spawn an actor that is not specialised for your needs, and make general-purpose interactions for it. Simple uses, and complex methods (handing over custom inventory code for immediate execution, passing and fetching pointers, monitoring).
User avatar
FDARI
Bronies eunt domus
 
Joined: 03 Nov 2009

Re: Pointer to spawned actor (A_SpawnItemEx)

Postby Major Cooke » Tue Mar 22, 2011 9:05 pm

FDARI wrote:Peril: Even more manual pointer management. I like it, and work hard to do it without these functions. Modders who previously didn't know how to crash ZDOOM will now have more tools at their disposal.


I'm rolling and laughing at this, that's seriously the best way to describe mod-making on hardcore mode. Countless numbers of times I've crashed my Zdoom doing this.

But yet, this'll be something to look forward to.
User avatar
Major Cooke
That's how my uncle stole christmas three times in a row in a single year. -DBT
 
Joined: 28 Jan 2007

Re: Pointer to spawned actor (A_SpawnItemEx)

Postby Graf Zahl » Fri Mar 25, 2011 1:27 am

Sorry, but this time I do WFDS it.
User avatar
Graf Zahl
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests