Expose APlayerPawn :: GiveDefaultInventory to ZScript

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: Developers

Expose APlayerPawn :: GiveDefaultInventory to ZScript

Postby m8f » Mon May 14, 2018 9:26 pm

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.
User avatar
m8f
the dreamer
 
Joined: 29 Dec 2017
Location: Siberia
Discord: m8f#0629

Re: Expose APlayerPawn :: GiveDefaultInventory to ZScript

Postby XxMiltenXx » Wed May 16, 2018 6:44 am

I second this.
XxMiltenXx
 
Joined: 08 Jan 2014

Re: Expose APlayerPawn :: GiveDefaultInventory to ZScript

Postby m8f » Thu May 17, 2018 10:51 pm

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.
User avatar
m8f
the dreamer
 
Joined: 29 Dec 2017
Location: Siberia
Discord: m8f#0629


Return to Feature Suggestions

Who is online

Users browsing this forum: Cacodemon345, Discord [Bot], Marisa Kirisame, wolfmanfp and 1 guest