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

[0.4] Hostile NPCs.

elnelson

Lunaria World Dev
Joined
Jun 20, 2009
Messages
580
Solutions
2
Reaction score
58
Location
México
Hello otlanders, i saw a interesting function; selfMoveTo.
so i was wondering if its possible to make roaming NPCs in dungeons like normal players hunting creatures.

so if you get close to him he will threat you with some warnings like "leave" or "dont get closer"

if you dont leave or get close enough to him, he will attack you (i think there is already a function to this)

NPC must be killable (i cant not find a way. some post says it need source edit)

well i think this can be done on Lua TFS 0.4
 
If you don't want to source edit, I'd do this one of two ways.

Don't make the creature an NPC, instead make it a monster.
or
When the NPC needs to start attacking, remove the npc, and spawn a monster in it's place.
Add a few triggers to check when the monster should stop attacking, then remove the monster and spawn the npc.

First way is easier.
Second way is better if you don't want the player to see the battle sign until the creature need to attack the player, but it's harder to accomplish.
 
If you don't want to source edit, I'd do this one of two ways.

Don't make the creature an NPC, instead make it a monster.
or
When the NPC needs to start attacking, remove the npc, and spawn a monster in it's place.
Add a few triggers to check when the monster should stop attacking, then remove the monster and spawn the npc.

First way is easier.
Second way is better if you don't want the player to see the battle sign until the creature need to attack the player, but it's harder to accomplish.
i guess i will need source edit to acomplish that, i want to create a more complex enemy u.u
 
Back
Top