Menu
MotorCortex Logo
MotorCortexDocs
MotorCortex LogoMotorCortex
    • GETTING STARTED
      • Installation
      • Introduction
      • Main Concepts
    • BASIC CLASSES
      • Clip
      • Group
      • Combo
    • PLUGINS
      • The MotorCortex Library
      • Discovering, Loading and Using plugins
      • Effects and Animations
      • Types of Plugins
    • EXECUTION
      • Native commands
      • Players
    • JSX
      • JSX
    • ADVANCED FEATURES
      • Clip as Incident
      • Dynamic Values
      • Selectors
      • Incident cloning
    • SOUND
      • Loading a sound
      • Audio Incidents
      • Master volume
    • EDITING
      • Adding Incidents
      • Remove Incidents
      • Move Incident
      • Resizing Incidents
      • Edit Incident’s attributes
      • Edit Incident’s properties
    • PLUGINS DEVELOPMENT
      • onGetContext
      • Mono Incident / one element, one animated attribute
      • The scratch value
      • Channeling and validation
      • Channels
      • API
      • Plugin structure
      • The MonoIncident
      • Combos
      • Create composite behaviours
      • Create your own Clips and expose them as Incidents
      • Custom Entities
      • Put sound on the game
      • Blockings
    • EXECUTION CONTROLS
      • Play / Pause
      • Set execution speed
      • Subscribe to Clip’s events
      • Subscribe to Clip’s duration changes
    • EXPORTING, REBUILDING AND CLONING
      • Clip Clone
      • Exporting
    • Appendix A
      • attributesValidationRules
        • The basics

    Adding Incidents

    Incidents can be added either on Groups or Clips. Both Classes provide the (same) addIncident method.

    • Method: addIncident
    • Arguments (2):
      • Incident (the Incident to be added)
      • millisecond: the millisecond that we want to place it
    • Returns: object with the following keys:
      • result: either true or false
      • errors: an array of errors in case the addition is not valid
    Previous
    « Master volume
    Next
    Remove Incidents »