Or, as an alternative, expose some new function APlayerPawn :: ResetInventoryToDefault that calls ClearInventory and then GiveDefaultInventory.
It may have the following use cases:
1. Strip player of all the weapons inside the map.
Map designers will be able to create single-level "get into and escape the prison" scenarios, instead of separating scenario in two levels and using property "ResetInventory" in MAPINFO/Map definition.
2. Force pistol start.
Gameplay mod designers will have straightforward way to reset player inventory at level start.
3. Punishing/replacing pickup.
With GiveDefaultInventory, it will be possible to create a pickup that takes away all player possessions and gives some other thing instead.
Expose APlayerPawn :: GiveDefaultInventory to ZScript
Moderator: GZDoom Developers
-
- Posts: 219
- Joined: Wed Jan 08, 2014 8:40 am
- Graphics Processor: nVidia with Vulkan support
- Location: Germany
Re: Expose APlayerPawn :: GiveDefaultInventory to ZScript
I second this.
- m8f
-
- Posts: 1445
- Joined: Fri Dec 29, 2017 4:15 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Manjaro Linux
- Location: Siberia (UTC+7)
- Contact:
Re: Expose APlayerPawn :: GiveDefaultInventory to ZScript
First, I just realized that this thread is a duplicate of this: ResetInventory
It's funny because I actually used a solution posted there.
Second, I made some modifications to that solution. Changes are:
1. Armor and health are also reset.
2. Instead of taking all the weapons, all inventory is cleared.
3. After setting weapons, first start weapon is selected.
With these changes I managed to make pistol start script work properly for Trailblazer and DUMP3 weapons.
It's funny because I actually used a solution posted there.
Second, I made some modifications to that solution. Changes are:
1. Armor and health are also reset.
2. Instead of taking all the weapons, all inventory is cleared.
3. After setting weapons, first start weapon is selected.
With these changes I managed to make pistol start script work properly for Trailblazer and DUMP3 weapons.