Pickup only for specific player

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

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.
Posts: 1
Joined: Wed May 31, 2023 10:46 am

Pickup only for specific player

Post by Motombo »

I'm looking to make a specific item pickable only by a specific player. This would help in coop, so that -for example- Backpack 1 can only be picked up by Player 1, and Backpack 2 can only be picked up by Player 2. I've just started with mapping, and my scripting knowledge is minimal, but is there a way to do this?
User avatar
Posts: 1442
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Pickup only for specific player

Post by ramon.dexter »

Well, this could be probably handled by zscript eventhandler. But I dont know how zscript handles multiplayer, yet if it even supports such use. I think this question belongs more into scripting than mapping. It's not a question of placement, but a scripting thing.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48879
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Pickup only for specific player

Post by Graf Zahl »

Event handlers won't help here. For this the TryPickup method needs to be overridden and check whether the player is allowed to take the item.

Return to “Mapping”