Spoiler:In the above scenario, the item would check for dummy items and heal the player according to the item found in the inventory. This mainly caters to Strife and Raven, but could be used in Doom to impart other effects on death as well. It could be used to give player classes a death throes or heal and teleport the player. The item would only refer to the use state if present, otherwise it would use the Health property to determine its action.
HealthPickup.Autouse refers to use state
Moderator: GZDoom Developers
- Spottswoode
- Posts: 18
- Joined: Tue Jan 17, 2012 8:41 pm
HealthPickup.Autouse refers to use state
Just like it says. But for a clearer example
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49230
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: HealthPickup.Autouse refers to use state
Since nothing but CustomInventory actually has a use state the entire suggestion is pointless.
- Spottswoode
- Posts: 18
- Joined: Tue Jan 17, 2012 8:41 pm
Re: HealthPickup.Autouse refers to use state
It is explicitly denoted that you would have to add a use state to the item for it to be used. Likewise, inference would say that you also add code for the use state on this.
Re: HealthPickup.Autouse refers to use state
The problem is that even if you do that, it wouldn't work. CustomInventory is the only actor class which will make its state be run by its owner.
What you want isn't to have health items behave like CustomInventory, what you want is AutoUse conditions for CustomInventory.
What you want isn't to have health items behave like CustomInventory, what you want is AutoUse conditions for CustomInventory.
- Spottswoode
- Posts: 18
- Joined: Tue Jan 17, 2012 8:41 pm
Re: HealthPickup.Autouse refers to use state
Thank you for being more precise. Custom inventory with autouse would do the same thing, but my suggestion was made out of ignorance with regard to the source code. The idea was to make a more simple update.