• Tutorials

  • Home
  • $EVENT_WhoTries

    UAFWinEd has a somewhat generic way of communicating information to hooks in the engine during the execution of an event. Four pieces of information are transmitted:

    1. The name of the event. This is transmitted in the name of the Special Ability that contains the hook. For example, hooks associated with the 'Who Tries' event will belong to Special Abilities whose name starts with “$EVENT_WhoTries”.
    2. The particular action or processing within the event that is to be modified. This information is also transmitted in the name of the Special Ability that contains the hook. For example, When the player selects a character within the Who Tries to make some sort of attempt, the hook will be found in the Special Ability that starts with “$EVENT_WhoTries_Attempt”
    3. The name of the hook's script: The player selects this when he edits the event. This name is totally arbitrary insofar as the editor and engine are concerned. The designer will probably choose a name for which an existing hook script exists, but he is free to choose any name and can supply the associated script himself using the Special Abilities editor.
    4. The parameters to be supplied to the hook. These are supplied by the designer as comma-separated values. The first will be found in the script's hook parameter [5], the second in hook parameter [6], the third in hook parameter [7], the fourth in hook parameter [8] and any remaining, as a delimited string, in hook parameter [9].

    If there are many scripts specified by the designer in the design of the event, then all the scripts will be run in an undefined order. Each script will find the result of the preceeding scripts in hook parameter[0]. Also, hook parameters [1] through [5] will remain unchanged between script executions so that the scripts can communicate such things as decision priority, etc.

    Parameters

    See #4 above

    Context

    Character - the character selected to make the attempt

    Return Value

    If the result begins with 'N', then the attempt fails.