New function: bool SetPointer(int assign_slot, int tid[, int pointer_selector[, int flags]])
Assign slot: Select what pointer to assign, out of target, master and tracer. (AAPTR_TARGET,AAPTR_MASTER,AAPTR_TRACER)
Tid: Tid of actor to point to. (First actor found is chosen)
Pointer_Selector: Optional; copy one of the selected actor's pointers instead of pointing directly to it.
Flags: Flags that affect the pointer operation (optionally skipping some safeguards)
Return value: Returns true if a non-null pointer was found (using the combination of tid and pointer_selector), false otherwise.
Related modifications:
This patch builds on changes made in
SetActivator extended with AAPTR. This patch duplicates the other patch, and adds the new function.
Less evidently related modifications:
When scripting my demo, it transpired that [wiki]GetActorViewHeight[/wiki] cannot take tid 0 as a parameter (as of around version 2.4.1). Fixing this was as simple as to write "activator" instead of "NULL" as the default result from looking up a single actor by TID. Since I needed/wanted it for the demo, I made the change. I can make a patch without this change if that is preferred.
The demo
Doom imps with most wicked tracing projectiles. Inspired by some reference to path-tracing corner-turning projectiles in quake.
[b]New function: bool SetPointer(int assign_slot, int tid[, int pointer_selector[, int flags]])[/b]
Assign slot: Select what pointer to assign, out of target, master and tracer. (AAPTR_TARGET,AAPTR_MASTER,AAPTR_TRACER)
Tid: Tid of actor to point to. (First actor found is chosen)
Pointer_Selector: Optional; copy one of the selected actor's pointers instead of pointing directly to it.
Flags: Flags that affect the pointer operation (optionally skipping some safeguards)
Return value: Returns true if a non-null pointer was found (using the combination of tid and pointer_selector), false otherwise.
Related modifications:
This patch builds on changes made in [url=http://forum.zdoom.org/viewtopic.php?f=34&t=29963]SetActivator extended with AAPTR[/url]. This patch duplicates the other patch, and adds the new function.
Less evidently related modifications:
When scripting my demo, it transpired that [wiki]GetActorViewHeight[/wiki] cannot take tid 0 as a parameter (as of around version 2.4.1). Fixing this was as simple as to write "activator" instead of "NULL" as the default result from looking up a single actor by TID. Since I needed/wanted it for the demo, I made the change. I can make a patch without this change if that is preferred.
[b]The demo[/b]
Doom imps with most wicked tracing projectiles. Inspired by some reference to path-tracing corner-turning projectiles in quake.