It is currently Tue Jan 06, 2009 11:34 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: My guards do not
PostPosted: Sun Feb 05, 2006 2:57 pm 
my guards do not defend ?
what i do

]


Top
  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 8:49 pm 
Offline
Certified POL Expert
User avatar

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1252
Location: Southern Central USA
Always need to include the version of POL you are running and if you are running POL Distro or not.

In the POL 95 Distro script named "townguard.src" located in \pol\scripts\ai this segment from the function "lookiehere" is what determines how the guard reacts in the presence of criminals.

Code:
function lookiehere()
  foreach npc in ListMobilesNearLocation(me.x, me.y, me.z, 15)
    foreach listing in keys
      var range := SplitWords(cfgfile[listing].range);
      if((npc.x >= CInt(range[1])) && (npc.x <= CInt(range[3])) && (npc.y >= CInt(range[2])) && (npc.y <= CInt(range[4])))
        var timer := Cint(GetObjProperty(npc, "guardstimer"));
         if((npc.criminal) and (!npc.dead))
          if(timer < ReadGameClock())
            SetObjProperty(npc, "#guardstimer", ReadGameClock() + 15);
             Fight(npc);
          endif



The "if ((npc.criminal..." is where that check is done. If one of the mobiles nearby is a criminal then the Fight function is called.

Your scripts should have something similar else your guards will just stand there.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 06, 2006 12:02 pm 
it is doesnt work. call this is not a guarded area (i am at britain)


Top
  
 
 Post subject:
PostPosted: Tue Mar 07, 2006 4:36 am 
Offline

Joined: Tue Mar 07, 2006 2:26 am
Posts: 3
in pol/regions there is a cfg file that determines areas subject to guard protection. look what you screwed, there or in any other part referring to that file.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 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 © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl