So I find myself calling A_SpawnItemEx a lot using SXF_NOCHECKPOSITION and wanting to do further stuff with the actor spawned. This means I must get the returned actor, but the returned bool is totally useless to me.
Something similar happens with the int returned by LineAttack.
Is there a way to return only the actor, or dump the other return into a dev/null like thing so I don't have to define a new garbage int/bool in this situation?
Return only one of two results?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Return only one of two results?
Last edited by Matt on Thu Mar 01, 2018 9:11 pm, edited 1 time in total.
-
- Posts: 2150
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Return only one of two results?
As far as I know, no, you need to get both return values.