oh, im tested! thanks, worked!Game.createMonster("Valkyrie", self:getPosition()) right before return false
you can, some time ago Mkalo help me with something like that, the respawn of a monster can be "changed" to another monster that is in the same "spawn" (that violet fire) I couldn't find another way to say it sorryyou can't directly change the actual monster spawn
ofc you can do whatever you want by changing sources, i'm saying the way it's made right now in my code you can't do that.you can, some time ago Mkalo help me with something like that, the respawn of a monster can be "changed" to another monster that is in the same "spawn" (that violet fire) I couldn't find another way to say it sorry
same issue hereusing these changes on latest tfs is making monsters no longer drop loot, or am I the only one with this issue? 🤔
A monster that died and respawnedwhat does artificial stand for?
No.A monster that died and respawned
True if it was spawned by artificial means, i.e. /m or Game.createMonster, false if it was created from their original spawn.what does artificial stand for?
true: the monster is spawned from a spawn on the mapNo.
True if it was spawned by artificial means, i.e. /m or Game.createMonster, false if it was created from their original spawn.
In the explanation I put it backwards for true/false, but the loot has nothing to do with this system.true: the monster is spawned from a spawn on the map
false: the monster is spawned artificially via Game.createMonster(name, pos)
that's what i understood from your explanation
also why's the loot not dropping of tfs 1.3
as weird as it can be, after undoing these changes the loot went back to normalthe loot has nothing to do with this system.
Must be something wrong because me and @Evil Puncker experienced the same issue, also loot in tfs 1.3 is generated in lua does that have anything to do with it?In the explanation I put it backwards for true/false, but the loot has nothing to do with this system.
} else if (className == "Monster") {
if (methodName == "onDropLoot") {
info.monsterOnDropLoot = event;
} else {
std::cout << "[Warning - Events::load] Unknown monster method: " << methodName << std::endl;
}
} else if (className == "Monster") {
if (methodName == "onDropLoot") {
info.monsterOnDropLoot = event;
} else if (methodName == "onSpawn") {
info.monsterOnSpawn = event;
} else {
std::cout << "[Warning - Events::load] Unknown monster method: " << methodName << std::endl;
}
also there another one search for if (className == "Monster") you'll find it else it won't work without i just tested itI see now, the Monster event class didn't exist before onDropLoot was added, so now there's an if statement at the end of the chain which is never executed, meaning onDropLoot will never execute from data/events/monster.lua.
Instead of adding the if (className == "Monster") portion to the top of the else/if chain, you need to place it under the current existing one that has dropLoot under it, and just check for the method name
to:C++:} else if (className == "Monster") { if (methodName == "onDropLoot") { info.monsterOnDropLoot = event; } else { std::cout << "[Warning - Events::load] Unknown monster method: " << methodName << std::endl; }
C++:} else if (className == "Monster") { if (methodName == "onDropLoot") { info.monsterOnDropLoot = event; } else if (methodName == "onSpawn") { info.monsterOnSpawn = event; } else { std::cout << "[Warning - Events::load] Unknown monster method: " << methodName << std::endl; }
That's literally what I wrote.also there another one search for if (className == "Monster") you'll find it else it won't work without i just tested it
Ahh my badThat's literally what I wrote.
I said instead of adding it to the top, you need to check methodname under the currently existing one in 1.3, which is at the bottom of the else/if chain, I even wrote an example of what I meant.
monster:remove()
map.getSpectators(list, >> tile->getPosition() <<, true)
bool Game::removeCreature(Creature* creature, bool isLogout/* = true*/)