Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How Restricted Areas Work In DtS
12-04-2020, 05:03 AM
Post: #1
How Restricted Areas Work In DtS
Hotel is the first mission I'm working on revamping which has what's known as OutdoorZoneTriggers, which are the predecessors of ZoneTriggers from MoT and AG. Only three DtS missions have them - Hotel, Die Spies!, and Removal. It was easy to convert OutdoorZoneTriggers to MoT-style ZoneTriggers, and I think I should use the opportunity to explain how the first Death to Spies handles restricted areas.

The number of restricted areas in DtS missions are more limited compared to those in later games. Depending on what rank of disguise you're wearing, most NPCs inside restricted areas will be hostile even if you're not in said areas, as shown by the minimap. For an NPC to be hostile to you when you enter a restricted area, you need to assign them a VisArea or OutdoorZone to guard.

For example, name the VisArea you want to assign as a restricted area "VA00", and assign the NPC to guard it using the AI_GuardRoom property, thus:

AI_GuardRoom = VA00

NPCs, however, have a limited radius when guarding a VisArea or OutdoorZone - this is most notable in large corridors, where the further away you are from the guard at the door from inside the corridor, his icon on the minimap becomes green again rather than red. This is where the AI_GuardRadius property comes in, as you can adjust the radius so it covers a whole room.

By default, the radius is set to 50.000, thus:

AI_GuardRadius = 50.000

OutdoorZones are not only obviously used in outdoor areas, but are also used within certain VisAreas. For example, the small room behind the reception desk in Hotel has an OutdoorZoneTrigger, because the VisArea it's in also covers the whole lobby. For the manager to guard this room, this is where the AI_GuardOutdoorZone property comes in. Thus:

AI_GuardRoom = CZ01
AI_GuardOutdoorZone = true

For an NPC to tell you not to enter the room they're guarding, you need to type this in the level's LUA:

function Level.OnStopMove( actorId )

if (actorId == 'HM03') then

Level.AddSmallMessage( MissionText.Message_StopMove1, 15.0, 255, 255, 255 );
return;

end

end

For an NPC to not let you in if you're wearing a certain rank of disguise, this needs to be typed into the LUA:

function Level.CheckNeedStop( actorId )

local player = Level.GetPlayer();
if (player == nil) then
return false;
end

local form = Actor.GetActorType(player);

if (actorId == 'HM03') then

return true;

end

return true;

end

If you want to restrict the room to hotel staff, this needs to be typed in:

if (actorId == 'HM03') then

if (form == Actor.ACTOR_TYPE_CIVILIAN) then
return true;
else
return false;
end

return true;

end

With the implementation of the Zones system in MoT, the GuardRoom, GuardRadius and GuardOutdoorZone properties, while still in the game's exe and exportable on certain Actors, are made redundant.

I hope I have given you good insight into how restricted areas are handled in DtS compared to the later games.
Find all posts by this user
Quote this message in a reply
12-04-2020, 07:32 PM (This post was last modified: 12-04-2020 07:32 PM by Alexey.)
Post: #2
Thumbs Up RE: How Restricted Areas Work In DtS
Nice research Exclamation
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)