• 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!

Lua Body of summoned creature

kfalls

New Member
Joined
Jan 11, 2018
Messages
16
Reaction score
1
Does anyone know how to make the summoned creature not leave a body when it dies, both player and monster summons?



Just give me a tip on how to do it, and I'll do the rest with the help of chatgpt


for : tfs 0.3.6
 
Solution
Not even chatgpt will help you with using such an outdated piece of software. 0.3.6 is literally as old as most of gen z... stop using old software and expecting support for it.
or even gen-y.

solution:

creature.cpp
under:
C++:
void Creature::dropCorpse(DeathList deathList) {

add:
C++:
Monster* monster = this->getMonster();
if (monster && monster->getMaster()) {
 return;
}

and for player to prevent dop the corpse if he had summons (?? i think from request)

under our new code
C++:
Player* player = this->getPlayer();
if (player && player->getSummonCount() > 0) {
   return;
}

btw @Codinablack is absolutely right, 0.3.6 its very out of date and not beginner friendly, consider change you'r tfs to 1.x, way...
Not even chatgpt will help you with using such an outdated piece of software. 0.3.6 is literally as old as most of gen z... stop using old software and expecting support for it.
or even gen-y.

solution:

creature.cpp
under:
C++:
void Creature::dropCorpse(DeathList deathList) {

add:
C++:
Monster* monster = this->getMonster();
if (monster && monster->getMaster()) {
 return;
}

and for player to prevent dop the corpse if he had summons (?? i think from request)

under our new code
C++:
Player* player = this->getPlayer();
if (player && player->getSummonCount() > 0) {
   return;
}

btw @Codinablack is absolutely right, 0.3.6 its very out of date and not beginner friendly, consider change you'r tfs to 1.x, way easier to help, way easier to learn, way easier to write systems/functions/scripts whatever we call it
 
Last edited:
Solution
or even gen-y.

solution:

creature.cpp
under:
C++:
void Creature::dropCorpse(DeathList deathList) {

add:
C++:
Monster* monster = this->getMonster();
if (monster && monster->getMaster()) {
 return;
}

and for player to prevent dop the corpse if he had summons (?? i think from request)

under our new code
C++:
Player* player = this->getPlayer();
if (player && player->getSummonCount() > 0) {
   return;
}

btw @Codinablack is absolutely right, 0.3.6 its very out of date and not beginner friendly, consider change you'r tfs to 1.x, way easier to help, way easier to learn, way easier to write systems/functions/scripts whatever we call it
I did this with the help of chatgpt, the body of the summoned creature disappeared, but there was an error in the district about this "creature" function. and when the creature that has the script tag dies, the body disappears.
LUA:
function onDeath(creature, corpse, killer, mostDamageKiller)
  
    if creature:isSummon() then
        if corpse then
            corpse:remove() -- 
        end
    end

    return true
end
 
Back
Top