Feature #1244
Scripting in model definitions (e.g., dependent on player health)
100%
Description
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
(netgames!).
Related issues
History
#1 Updated by skyjake about 11 years ago
- Tags set to 3DModel, Definitions, Scripting
- Subject changed from Model def conditions to Conditional model definitions
- Category set to Enhancement
- Priority changed from Normal to High
#2 Updated by skyjake about 11 years ago
- Description updated (diff)
#3 Updated by skyjake about 11 years ago
This use case requires runtime evaluation of condition expressions instead of the basic load-time execution that ScriptedInfo
does.
#4 Updated by vermil about 11 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.
#5 Updated by skyjake about 11 years ago
selector for sprites
That's a nice idea; added feature #1616.
#6 Updated by skyjake about 9 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.
#7 Updated by skyjake about 9 years ago
- Subject changed from Conditional model definitions to Scripting in model definitions (e.g., dependent on player health)
- Description updated (diff)