Page 1 of 1
Render layer of item on ground
Posted: Wed Jul 08, 2020 1:20 pm
by Pi-C
The
Maps mod rewards players for killing trees, spawners, or worms by adding loot to those entities: "maps" that will reveal the area around the player in a certain radius. Now I've got a report that those maps (prototype "item-entity") are hidden by the corpses of worms and biters/spitters.
For testing, I've set the probability of entities dropping loot to 100%. This is what a defeated base of the native fauna looks like:

- maps.png (2.61 MiB) Viewed 535 times
Notice the different maps on top of the spawners, and the absence of maps on the corpses of the worms.
Is there any way to render an "item-entity" above the corpse layer?
Re: Render layer of item on ground
Posted: Thu Jul 09, 2020 4:36 pm
by darkfrei
Something like on_entity_died if biter corps and if near item-on-ground "map" then remove corpse.
Or somehow replace biter corpse with player corpse, it can have loot inventory.
Re: Render layer of item on ground
Posted: Thu Jul 09, 2020 5:09 pm
by Pi-C
darkfrei wrote: Thu Jul 09, 2020 4:36 pm
Something like on_entity_died if biter corps and if near item-on-ground "map" then remove corpse.
Yikes, that sounds expensive!
Or somehow replace biter corpse with player corpse, it can have loot inventory.
I don't even need that. As you can see on the screenshot in my last post, the loot was picked up although it was invisible. The problem is making it visible, so people know they should walk over to a dead worm to pick it up. But changing the corpse is not a bad idea! I think it could work if I'd add a second layer with the map to the last frame of the corpse.animation to all turrets during the data stage because there is a visual indicator. That way, I could ignore worms in on_entity_died.
For biters/spitters, on_entity_died could still be costly. Perhaps it would be easier to considerably reduce the time they need to rot away. This is also required just during the data stage, and it could even help with UPS if enemy corpses expire faster. Thanks a lot for the idea!
