Full Version : Trigger spawns based on player proximity
xmlspawner >>XMLSpawner - How do I? >>Trigger spawns based on player proximity


<< Prev | Next >>

ArteGordon- 01-01-2006
Triggering spawns when players are nearby:

The ProximityRange property of the spawner sets the minimum distance (in tiles) a player has to be from the location of the spawner for it to be triggered.
A value greater that zero means that the spawner will be triggered when player movement is detected within that range.
A value of 0 means the player must be at the exact location of the spawner.

If a player does not move but is still within range, then the check for player proximity will only occur once every min/maxdelay period (this allows detection of stationary players).

A value of -1 means that player movement triggering is disabled (the default value) and the spawner will just spawn automatically based on the min/maxdelay settings.

A value of -2 means that the spawner will not be triggered by player movement and will not spawn automatically. The only way to activate a spawner with this setting is to have the ProximityActivated property externally set to true. This setting is used to create spawners that are completely under external control.

If any other triggering features have been enabled (such as speech or skill triggering), those will also have to be satisfied for triggering to occur.

After a spawner has been triggered, then spawning is enabled and will occur according to the settings of the mindelay, maxdelay, duration, spawnrange, spawn probability, and other settings just as they would for normal spawning.

By setting the SpawnOnTrigger property to true, you can force spawning to occur immediately after triggering instead of waiting for the min/maxdelay period.

Refractory period for triggering:

The RefractMin and RefractMax properties specify the period following triggering during which the spawner cannot be triggered again (the refractory period).

Triggering sound:

You can optionally specify a sound that will be played when the spawner is triggered by setting the ProximitySound property (default value = 500).
The program InsideUO is useful in finding the values for particular sounds.

Triggering message:
You can optionally specify a message that will be displayed over the players head when the spawner is triggered by setting the ProximityMsg property (default value = null).

Example:

For example, setting up a spawner with

ProximityRange = 2
Min/MaxDelay = 3 seconds
RefractMin/Max = 10 mins
ProximityMsg = "Here it comes"
ProximitySound = 744

will create a spawn that is triggered by a player within 2 squares of the spawner, with the spawn appearing 3 seconds after triggering, and cannot be retriggered for 10 mins.
When the spawn is triggered the message "Here it comes" will appear over the players head, and a drumbeat sound will be played.

Mage-Solitaire- 01-01-2006
Déclenchement du spawner quand le joueur est proche:

La propriété "ProximityRange" du spawner détermine la distance maximum (en tiles) où doit se trouver le joueur par rapport au spawner pour qu'il se declenche.
Une valeur de 0 signifie que le joueur doit être à l'endroit exact du spawner.
Une valeur de -1 signifie que la propriété est inactive(la valeur par défaut).

Le spawner se déclenchera donc quand il detectera un mouvement d'un joueur dans sa zone de detection.

Si un joueur ne se déplace pas mais est dans la zone de détection, alors le contrôle pour la proximité de joueur se produira seulement une fois par période min/maxdelay (ceci permet la détection des joueurs stationnaires).

Si des autres dispositifs de déclenchement ont été permis ("speechtrigger" ou "skilltrigger"), ceux-ci devront également être satisfaits pour que le déclenchement se produise.

Après qu'un spawner ait été déclenché, il ne se re-enclenchera qu'une fois les arrangements de "mindelay", "maxdelay", de "duration", de "spawnrange", "spawnprobability", et autres arrangements vérifiés, comme pour un spawning normal.

En plaçant la propriété de "SpawnOnTrigger" sur "true", vous pouvez forcer le spawning à se produire juste après le déclenchement au lieu d'attendre la période de min/maxdelay.


Période réfractaire pour le déclenchement:


Les propriétés de" RefractMin" et de "RefractMax" indiquent la période min/max durant lequel le déclenchement ne peut se faire: il ne relancera le spawning qu'une fois cette période écoulée (la période réfractaire).


Déclenchement du bruit:


Vous pouvez sur option indiquer un bruit qui sera joué quand le spawner sera déclenché en modifiant la valeur de "ProximitySound" (valeur par défaut = 500).
Le programme InsideUO est utile pour trouver les valeurs pour les bruits particuliers.


Déclenchement du message:
Vous pouvez sur option indiquer un message qui sera affiché au-dessus de la tete des joueurs quand ils déclenchent le spawner en modifiant la valeur de "ProximityMsg" (valeur par défaut = nulle).


Exemple:

Par exemple, en installant un spawner avec
ProximityRange = 2
Min/MaxDelay = 3 secondes
RefractMin/Max = 10 minutes
ProximityMsg = "ici il vient"
ProximitySound = 744
Vous créez un spawn qui sera déclenché par un joueur à moins de 2 tiles du spawner, avec le spawn apparaissant 3 secondes après le déclenchement, et ne peut pas être re-enclenché pendant 10 minutes. Quand le spawn est déclenché le message "ici il vient" apparaîtra au-dessus de la tete des joueurs , et un bruit de drumbeat sera joué.