Indirect Operations

Certain operations are not allowed in DSA filters.  Generally, these are operations that could result in objects being added or deleted from the dungeon.  An example is &MOVE which causes an object to be deleted from one location in the dungeon and added to another.  These operations are listed in the Help page which can be accessed from the DSA editor Dialog.

To make things easier for the designer, each of these operations has an 'Indirect' version which CAN be used in Filters.  The 'Indirect' versions have the same name with the percent character inserted immediately after the initial ampersand.  For example: &%MOVE.  The 'Indirect' version of these words gathers together all the parameters needed to perform the operation and sends them off to another DSA using the &MESSAGE word.  This other DSA is located at a place in the dungeon specified on the Global Info Dialog page in the 'Special Locations' and is named the 'Indirect Action Location'.  When the filter is completed, the message will be delivered to this Indirect Action DSA which can use the word &%INDIRECT to reconstruct the necessary parameters from the Message and perform the operation that was initially intended. 

The Indirect Action DSA need not use the &%INDIRECT word if it chooses to manipulate the parameters themselfs.  For example, it may want to see if an object that it is about to delete still exists.  The parameters have this format:

 - The action to perform
 - The number of stack entries
 -  . . . the stack entries . . . Top of stack comes first
 - Flag --- 0 if no array variables.  1 if array variables.  Top of stack is number of variables,  next to top is index of first array variable
 -  . . . Array variables . . .
 - Number of parameters
 -  . . . parameters . . .

The action to perform is from this list:
    Del          = 79
    Add          = 80
    CreateCloud  = 81
    Cast         = 82
    TeleportParty= 83
    MonsterStore = 84
    CharStore    = 85
    Move         = 86
    Copy         = 87
    CellStore    = 88
    Throw        = 89
 


The message that delivers this information has a delay of 0 and therefore the operation will not be delayed in game time.  But it will be delayed in realtime and you need to know that when you say &%MOVE the actual move will not take place until the current DSA is completed.  Moreover, multiple 'Indirect' operations within a single DSA will not necesarily be performed in the same order that the commands were issued.  For example, if you do a &%ADD followed by an &%DEL, the delete may actually be performed before the add.