Troubles including a .ssl in another .ssl

Sirren67

Look, Ma! Two Heads!
I'm trying to link a npc to a container, i.e. if the you try to access
the container the npc warns you not to do so.
The container's script simply is:

#define EXTRA_HEADER "..\headers\arroyo.h"

#define WATCHER_OBJ arroyo_Oliver_obj

#include "..\generic\ziLocker.ssl"

The point is that I can't compile it becouse ziLocker.ssl cannot be found.
I'm using the following scripts as a guideline:
nipornlk.ssl (container script)
ncactres.ssl (critter script)
newr2.ssl (map script)
...and of course ziLock.ssl (generic locker script)
These are the script used by the Corsican Brothers' actresses to keep the Pc off theyr containers.
I edited arroyo.H.
What's wrong? I also noticed they only give you a single warning before they attack. How can I set my critter to give at least 2 warnings? I need my Npc to enter dialogue after that, not to attack.
Can it be done without tinkering with ziLocker.ssl?
 
I did something like this for New Arrayo project.

HOW TO SET NPC GUARDING A CONTAINER

1) First export variable from map script (it will hold NPC pointer)

Code:
export variable npc_pointer;

2) Import that variable in container script

Code:
import variable npc_pointer;

3) Add procedure Steal_proc to container script (it will call npc script when player steal)
Code:
procedure Steal_proc 
begin 
      if (obj_is_visible_flag(npc_pointer)) then  
      begin 
         script_overrides; 
         add_timer_event(npc_pointer,1,6); 
      end  
end
As you see add_timer_event is used to call npc script.

4) Pu calls to Steal_proc in procedures like pickup_p_proc, use_p_proc etc.
Code:
procedure pickup_p_proc 
begin 
 call Steal_proc; 
end

5) In NPC script import npc_pointer variable

Code:
import variable npc_pointer;

6)In NPC script write timed_event_p_proc


Code:
procedure timed_event_p_proc  
begin 
      
  if fixed_param == 6 then 
  begin 
   if local_var(LVAR_steal_count) < 3 then 
   begin 
     float_msg(Self_obj,"Leave that container in peace",FLOAT_MSG_RED); 
     set_local_var(LVAR_steal_count,local_var(LVAR_steal_count) + 1); 
   end   
   else 
   begin 
     set_local_var(LVAR_Hostile,2); 
     float_msg(Self_obj,mstr(256),FLOAT_MSG_RED); 
   end       
  end  
   
end
As you see player will be warned 3 times before hostile.

If it can't find that file then use full path like this:
#include "C:\Program Files\Black Isle\Fallout 2 Mapper\scripts\GENERIC\Zilocker.ssl"
 
O.k. I used your code anf it works fine. Simpler than the method I was trying to use and as much effective. Thank you once again.
 
Back
Top