Inteng, additional notes

More about switches

Each and every switch in AvP has a number of properties that you can edit. I’ve composed a small diagram of the standard screen:

Timer: This sends an on message, waits for the specified time and then sends an off message.

Time Delay: This waits for the specified time, then sends an on message and is reset.

Time Delay (Autoexec): Exactly the same as a time delay but it starts off the game counting down.

Wait: The most common type of switch. Once it is turned on, it stays on and waits. The player cannot reset this switch, but if it is targeted by another switch then it will reset and send an off messages

Toggle: Player can toggle it on and off.

The Security Level of the switch is another hangover from the original version of AvP, in which we used security levels - a pickup object gave the player a security level (from 0 to 21) and the player could only use the switches at or below his security level. We don’t tend to use this nowadays.
Rest State On: Pretty obvious really.

A Note about Messages

You may notice that when you apply a target to a switch, it is displayed in the form of :

Targets:
(on) Object01
(off) Object31


The (on) and (off) represent the form of message that that switch will send to the target - in this case, pressing the switch would result in an on message going to Object01 and an off message to Object31. This is useful when you’re playing with fans / track objects etc. Bear in mind that in the previous text I have assumed that all messages were (on) messages. If they were (off) messages then adjust the subsequent messages in the obvious inverted manner.

An Oscillating Strategy

This is something Richard told me about cos I was curious. It’s a neat way of doing stuff.

The door will open and close forever with this strategy, as long as you set one of the Time Delays to being an autoexec. Otherwise, calling either of the switches will set off the oscillations. This could be used for any number of switches or behaviours. It’s a good timer.

A note about designing strategies

These are personal observations, not rules - so don’t worry if you don’t agree. I believe quite strongly that the best way to create strategies is to emulate the diagrams I scrawled in this document. Write a flowchart before you start - it makes life so much easier.

In addition, I think that it is best to use the simplest possible strategies you can - do NOT hang loads of strategies off one set of switches - you will regret it. Use more virtual objects than are strictly necessary and make sure they’re simple links between them. That way problems can be ironed out more easily, and you’ll be able to locate where things are going wrong.

A Note about Generators, Doors and Switches

As you probably know, switch doors (or locked prox doors) or platform lifts all pose severe problems for the far AI in AvP.

This is a big problem when you have a load of unswitched generators in your level generating bad guys - some of them will be generated in areas that don’t link to where the player is.

It is vitally important that you use area switches to activate/deactivate the generators in each section of level as the player moves through it, thereby ensuring that creatures are always generated in the player’s local vicinity. If you don’t, I (and the coders) will shout at you, grumble and fix it ourselves.

Bear in mind that placed AIs do not suffer these problems, but one of AvP’s unique selling points is that we have ‘hunting’ AI - a player must not be able to stand still for minutes without being attacked. Thus you cannot simply cop out and use placed AIs everywhere.