View Issue Details

IDProjectCategoryView StatusLast Update
0000078Gameplay + OpenGL[All Projects] Featurepublic2017-01-20 10:40
Assigned To 
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version7
Summary0000078: Return reference to actors spawned via action functions
DescriptionIt'd be great if functions like A_SpawnItemEx, A_SpawnProjectile, in ZScript could return a pointer to the spawned actor so we can do further things with it.

Though we can now call Spawn() directly in ZScript and obtain an actor reference that way, going that route means reimplementing a bunch of stuff that these action functions already do, which is not particularly elegant. I'd rather not have to reinvent a perfectly good wheel in order to be able to tinker with it later.

[For things like A_SpawnItemEx that already have a non-void return type, an 'out' parameter would suffice as well.]
TagsNo tags attached.



Graf Zahl

Graf Zahl

2017-01-19 14:49

administrator   ~0000139

No need for 'out'. ZScript supports multiple return values on a function.
Graf Zahl

Graf Zahl

2017-01-20 05:30

administrator   ~0000147

Added to A_SpawnProjectile, A_FireProjectile, A_SpawnItem, A_SpawnItemEx and A_ThrowGrenade.

NOT added to the compatibility wrappers A_CustomMissile and A_FireCustomMissile.


2017-01-20 10:40

developer   ~0000159

Fantastic! Thanks for the add.

Issue History

Date Modified Username Field Change
2017-01-19 11:17 Xaser New Issue
2017-01-19 14:49 Graf Zahl Note Added: 0000139
2017-01-20 05:30 Graf Zahl Note Added: 0000147
2017-01-20 05:30 Graf Zahl Status new => resolved
2017-01-20 05:30 Graf Zahl Resolution open => fixed
2017-01-20 10:40 Xaser Note Added: 0000159
2017-01-29 21:18 Rachael Category Suggestion => Feature