Expose APlayerPawn :: GiveDefaultInventory to ZScript

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Expose APlayerPawn :: GiveDefaultInventory to ZScript

Re: Expose APlayerPawn :: GiveDefaultInventory to ZScript

by m8f » Thu May 17, 2018 9: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.

Re: Expose APlayerPawn :: GiveDefaultInventory to ZScript

by XxMiltenXx » Wed May 16, 2018 5:44 am

I second this.

Expose APlayerPawn :: GiveDefaultInventory to ZScript

by m8f » Mon May 14, 2018 8: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.

Top