* Login   * Register    * Search
It is currently Tue Mar 20, 2018 4:58 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Sep 10, 2017 4:14 am 

Joined: Fri Oct 16, 2015 8:11 am
Posts: 1
Location: Belgium
Hi ,

I wonder if there is some kind of fix to prevent monsters looking trough movers (doors)
we are also busy to write a Gametype for coop/koth under the UT99 platform, so maybe someone has more knowledge how to write this?
Or is there an existing "MOD" that can be used to resolve this kind of problems?




Greets Rubie

PostPosted: Sun Sep 24, 2017 2:14 am 

Joined: Tue Nov 10, 2009 4:14 pm
Posts: 328
That's SeePlayer hard-coded into monster.

XC_Engine v20 is able to "Replace" a function from an actor using internal same named ReplaceFunction. Samples are given directly into that engine extension which also is compatible with default player.

Code sounds like:
ReplaceFunction( class 'ScriptedPawn', Class 'XC_ScriptedPawn', 'SeePlayer', 'SeePlayer' );

And function which I'm using for about 2 years if I'm not mistaking is like this:
function SeePlayer(Actor SeenPlayer)
   local Actor A;
   local vector HitLocation, HitNormal;

   A = TraceShot( HitLocation, HitNormal, SeenPlayer.Location, Location );
   if ( A != None && A == SeenPlayer )
      if ( !SeenPlayer.bHidden && SeenPlayer.bCollideActors && SeenPlayer.Mesh != None && SeenPlayer.DrawType == DT_Mesh )
         if ( SetEnemy(Pawn(SeenPlayer)) )
            LastSeenPos = Enemy.Location;
If exist problems you can use adds - wrappers toward Pawn SeenPlayer but I don't think this will get called for non-pawns actors...
XC_ScriptedPawn is an abstract child which is used only for the replaced op code.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group