Announcement

Collapse
No announcement yet.

Stop monsters from using playerstart

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Nice one.Thanks. .

    Leave a comment:


  • replied
    THANK YOU Psyk! I found the little piece of code that did it. It seems as though they don't teleport around anymore and actually walk to your last known location. Sweet! Commented out are the problem areas, just in case anyone else has the same issue.


    function FightEnemy(bool bCanCharge)
    {
    local vector X,Y,Z;
    local float enemyDist;
    local float AdjustedCombatStyle, Aggression;
    local bool bFarAway, bOldForcedCharge;
    // local NavigationPoint N;

    if ( (Enemy == None) || (Pawn == None) )
    log("HERE 3 Enemy "$Enemy$" pawn "$Pawn);

    if ( (Enemy == FailedHuntEnemy) && (Level.TimeSeconds == FailedHuntTime) )
    {
    if ( !Enemy.Controller.bIsPlayer )
    FindNewEnemy();

    if ( Enemy == FailedHuntEnemy )
    {
    GoalString = "FAILED HUNT - HANG OUT";
    if ( EnemyVisible() )
    bCanCharge = false;
    else if ( (LastRespawnTime != Level.TimeSeconds) && ((LastSeenTime == 0) || (Level.TimeSeconds - LastSeenTime) > 0) && !Pawn.PlayerCanSeeMe() )
    {
    LastRespawnTime = Level.TimeSeconds;
    // EnemyVisibilityTime = 0;
    // N = Level.Game.FindPlayerStart(self,1);
    // Pawn.SetLocation(N.Location+(Pawn.CollisionHeight - N.CollisionHeight) * vect(0,0,1));
    }
    if ( !EnemyVisible() )
    {
    WanderOrCamp(true);
    return;
    }
    }
    }

    Leave a comment:


  • replied
    yes and then you have to subclass the monsters and make them use the new controller.

    Leave a comment:


  • replied
    In which class do you make the modifications? Do you subclass the monstercontroler?

    Leave a comment:


  • replied
    Look in the monstercontroller class. There's a function called FightEnemy that has this annoying bit of code that teleports monsters around if there's no one to fight nearby. Comment it out and it should stop that from happening.

    Leave a comment:


  • replied
    Filthy cheaters :up:

    Sorry, Im not a programmer, but I had to say that for some reason. :noob: :up:

    Leave a comment:


  • started a topic Stop monsters from using playerstart

    Stop monsters from using playerstart

    I have an odd issue, where my monsters will warp and appear at my playerstart if they can't reach me. Is there a way to keep them from using teleporters/playerstarts? I've tried setting their team numbers to differ from that allowed in the playerstart, and I've set them to bCanteleport=false, but nothing has worked so far. Any ideas?
Working...
X