Beispiel #1
0
    // creates a new trigger
    public void CreateTrigger(List<string> commandoList)
    {
        List<string> parameterList = commandoList[0].Replace("trigger(\"", "").Replace("\"","").Replace(")","").Split(',').ToList();

        Trigger trigger = new Trigger();
        if (parameterList.Count > 0 )
        {
            // this will initialize a new trigger, handle all errors and fails inside the trigger class. Allso sets the following trigger type and all the way further down the pipeline
            // if fail abortPlay will be called accordingly. class is dynamically added
            trigger.setTrigger(parameterList[0],objectId, parameterList);
        }
        else
        {
            abortPlay("not enough parameters in your new trigger.");
        }
    }