Spinning this topic off from discussion in NDRQs. I've been looking at Springheel's powder keg entity class; this is what I've currently got:
- Moving a slow match or a candle next to the barrel only ignites it because it's so sensitive to being pushed by moveables (see below). They don't have enough of a stim radius to reach the origin (and something weird's up with the candle flame: I had to move a light_candleflame entity right next to the origin to ignite it, regardless of radius). I fixed this on a slow match by giving it "sr_use_bounds" "1", but that has to be set on the stimming entity, not the response entity. Are we concerned about this? See also http://bugs.thedarkm...iew.php?id=1727
- Fire arrows, on the other hand, are so effective that even before I set up the fire Response, detonating one near a powder keg would skip the burn phase and go straight to its explosion.
- It's weirdly easy to set it off just by throwing objects at it or even pushing them against it: if something does any damage at all on collision, it can whittle the barrel's health down, even if it's a small object. (
It might be possible to disable damage altogether and respond to fire stims alone if the enableDamage(float enable) script event is inherited; I haven't tried.[Scratch that; it's for dealing damage.] Would we be happy if fire was the only way to set it off?)
- On the other hand, you can chuck the barrel around all you like. I think this code change from D3XP (Resurrection of Evil) might be to change that. If it does, and we want it, someone would have to copy it over (and make sure it didn't make the things lethal just to move around).
- Are we likely to want a long burning stage (id had 2.5 secs or nothing, I've currently set 3)? It raises questions of how to activate a fire stim when the burning stage starts, and whether water stims should stop the burning. (A function to stop burning was another D3XP addition, but I didn't notice a way to invoke it from outside C++ code, so we'd need that too...) Otherwise, we just need a fire stim to go with the explosion; I haven't tried the invisible debris idea yet.
- You can set a model to switch to when the barrel explodes, but it vanishes pretty abruptly after a few seconds, which doesn't look great with TDM's broken barrel models; I think you're stuck with the same collision model even if you've switched to a much smaller visual model; and D3 physics strike again, in that anything that lands on the new model is likely to hover in mid-air after it vanishes.
Edited by VanishedOne, 13 March 2019 - 10:43 PM.