Scripting in model definitions (e.g., dependent on player health)
Model definitions should be able to trigger Doomsday Script that then modifies the model's appearance or animation state. This enables the model definitions to react much better to what is taking place in the game world.
The original feature request is in terms of the old v1 model renderer:
This feature is intended to extend the Selector
mechanism of model definitions.
1. Game uses read-only (or runtime) cvars to store
information about the local player (health, armor,
current weapon, ammo, etc.)
2. Model def has a Condition key:
Condition = "player-health < 50 AND player-armor > 50";
3. The def is only used if the condition evaluates to true.
This is probably only applicable to the local player
#4 Updated by vermil about 8 years ago
I don't know if this is appropriate to post in this issue, but it might also be interesting to see the selector mechanism of models extended to sprites.
For instance, Doomers have made custom sprites of the Doom marine carrying every weapon and a bunch of Imp sprite variants.
Of course, then people would ask for flats, then textures etc etc, so I understand if sprites are refused.
#6 Updated by skyjake about 6 years ago
- Status changed from New to Closed
- Assignee set to skyjake
- Target version set to 2.0 – Home UI & Packages
- % Done changed from 0 to 100
The equivalent functionality is now implemented by GL2 model definitions being able to trigger Doomsday Script under certain conditions. The scripts can then access properties of the mobjs and modify the model's appearance accordingly.