public override bool PlayerRangeSensitive { get { return false; } }
Yeah, adding it to BaseCreature should do the trick. It's a good idea so you stumble upon mobs fighting each other. Make sure your spawners aren't set to despawn if no players are around as well. That will mess up the feelthank you, you got it right at the first shot. So I understand each script must have the override command, I guess I can just change the basecreature.cs, it would be worldwide. By the way that caravan script is amazing, and that's exactly what I was doing, I'll test that script as well, I'm just trying to setup a living world for a bounch of friends. I just want creatures to live on their own.
//public virtual bool PlayerRangeSensitive { get { return CurrentWayPoint == null && (_NavPoints == null || _NavPoints.Count == 0); } }
//If they are following a waypoint, they'll continue to follow it even if players aren't around
/* until we are sure about who should be getting deleted, move them instead */
/* On OSI, they despawn */
public virtual bool PlayerRangeSensitive { get { return false; } }
Yeah, it's going to be pretty rough on the cpu because all of the AI and timers will run continuously.I put the code in the basecreature.cs commenting out the original line
but the cpu load is too much and the server gets too laggy, but sure it works. I'll find out the right balance, maybe using some caravan code like you did. The problem with the caravan script is it doesn't get attacked by mobs because idle.C#://public virtual bool PlayerRangeSensitive { get { return CurrentWayPoint == null && (_NavPoints == null || _NavPoints.Count == 0); } } //If they are following a waypoint, they'll continue to follow it even if players aren't around /* until we are sure about who should be getting deleted, move them instead */ /* On OSI, they despawn */ public virtual bool PlayerRangeSensitive { get { return false; } }
We use essential cookies to make this site work, and optional cookies to enhance your experience.