Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 7 and Version 8 of code/doc/MultiTrigger


Ignore:
Timestamp:
Aug 31, 2010, 11:28:54 PM (10 years ago)
Author:
dafrick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/MultiTrigger

    v7 v8  
    77== Description ==
    88
    9 MultiTriggers are (just as Triggers) objects which react to certain events. They offer all the functionality that Triggers do with one significant difference. A Trigger hast just one state, it can either be triggered or not triggered, it doesn't discriminate between who's triggering it. A MultiTrigger on the other hand has a distinct state (triggered or not triggered) for each entity that is defined as being able to trigger said MultiTrigger.
     9MultiTriggers are (just as Triggers) objects which react to certain events. They offer all the functionality that [wiki:Trigger Triggers] do with one significant difference. A Trigger has just one state, it can either be triggered or not triggered, it doesn't discriminate between who's triggering it. A MultiTrigger on the other hand has a distinct state (triggered or not triggered) for each entity that is defined as being able to trigger said MultiTrigger.
    1010[[BR]]This difference becomes significant, when for example you want a DistanceTrigger to trigger a QuestEffectBeacon to hand out a Quest to any Pawn that enters its range. With a simple DistanceTrigger (as opposed to the more complex DistanceMultiTrigger) the first Pawn to be in range would trigger it an receive the Quest, however if a second Pawn would enter the range, while the first Pawn still is in the range nothing would happen and even after the first Pawn left nothing would happen, since all the time the DistanceTrigger would just be triggered. In contrast with a DistanceMultiTrigger the first Pawn would enter the range and the DistanceMultiTrigger would have the state triggered for this exact Pawn (but for none else) and thus the pawn would receive the Quest and when the second Pawn enters the range the state of the DistanceMultiTrigger for that second Pawn would change to triggered and it would receive the Quest as well.
    1111