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

TFS 1.X+ Monster attack Monster

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,200
Solutions
2
Reaction score
149
Is it possible to make a monster that attacks monsters and players? Always attack what's closest to him o_O

tfs 1.x+
 
Wouldn't it be enough to add some kind of "if" condition into onAttack, onSearchTarget and similiar functions in C++? ;)
probably yes, but you would also have to rework friendly fire prevention algo to consider factions.
In Lua you could just write the area spells to check target before hitting

edit: out of curiosity I tried to make two monsters attack each other through Lua
there were two results:
1: monsters were dancing together (wild vs wild), area spells and fire fields dealt no damage
2: server crashed (I think it happened when I was playing with setting monster as a summon and trying to make other creature attack it)

this means that you would have to play around friendly fire restrictions in c++ or rescript the way monster attacks in lua

edit2: found this: C++ - Enable Monster Friendly Fire [OTX3]
since otx 3 is obvious fork of TFS 1.x, this should apply to TFS sources as well
 
Last edited:
Back
Top