LogicIntro

In uru game logic is scene-object oriented.

On each scene object, there can be multiple modifiers assigned. These modifiers can generally be divided into two categories:

  • actions - Actions and Responders
    These are responsible for linking actions to these objects.
  • modifiers - Modifiers, Triggers and Conditionals
    These react to events in the object, or to messages from other objects, and can tell an action to start its performance.
    The basic class in this group is the Logic Modifier - it is the base class that is used to trigger actions.

In PyPRP, these are grouped as actions and modifiers.

PyPRP uses an AlcScript to describe these objects. Basically the setup is like this:

<object name>:
    logic:
        modifiers:
            # a list of subscripts that describe the attached modifiers

        actions:
            # a list of subscripts that describe attached actions

It is not always necessary to describe both.
for example in order to link scene objects to SDL python, it is sufficient to have only a .logic.actions subscript, that contains a python file mod referencing an SDL file.

Also, for OneShot animations, the action can be defined on one object, while the modifier that triggers it is located on another object.

We will go into these in more detail, starting at the logic modifiers.