• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to make corpses disappear with time

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
993
Solutions
5
Reaction score
55
Hello this question goes with monsters and players to. So i have no idea how to make monster/player corpses disappear with time what i though that i need to add

XML:
<attribute key="decayTo" value="0" />
        <attribute key="duration" value="10" />
So after 10seconds corpse will decay to 0 which is empty sprite so automatically it will disappear or im wrong this is a bad way to make it disappear. So example it would be

XML:
 <item id="12788" article="a" name="dead creature">
        <attribute key="weight" value="1000"/>
        <attribute key="corpseType" value="blood"/>
        <attribute key="decayTo" value="0" />
        <attribute key="duration" value="10" />
        <attribute key="containerSize" value="10"/>
    </item>
 
its correct, put decay to 0
Isnt it gonna cause like performance problem in the server because maybe im just over thing it, but if you say its a correct way to decay to 0 isnt in map there still will be empty sprite on map? with id 0, like imagine there is corpse with id 100 then you die, then after 10seconds it decays it to id 0 so if im not wrong there is still will be invisible sprite on the map, it just that you wont be able to see it. But maybe like i said im just over thing it.
 
Isnt it gonna cause like performance problem

Your average CPU is capable of executing tens of millions of lines of code in less than a second.
Having it delete a corpse object in the world, especially if you set a delay between the corpse being created and the corpse being destroyed, will have exactly zero performance impact. Even if you were to give god mode to every single one of your players so they can one shot monsters.
 
Back
Top