edited October 2020 in ORK Scripting
just by calling ORK.Game.Difficulty = your DifficultyIndex
Post edited by RustedGames on
  • And here the custom step


    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using ORKFramework;
    using ORKFramework.Behaviours;

    namespace ORKFramework.Events.Steps
    {

    [ORKEditorHelp("Change Difficulty", "Change the Game Difficulty.", "")]
    [ORKEventStep(typeof(BaseEvent))]
    [ORKNodeInfo("Game/Game")]
    public class ChangeDifficultyStep : BaseEventStep
    {

    [ORKEditorHelp("Difficulty Name", "Select the difficulty that will be changed to.", "")]
    [ORKEditorInfo(ORKDataType.Difficulty)]
    public int difficultyID = 0;

    public ChangeDifficultyStep() { }

    public override void Execute(BaseEvent baseEvent)
    {
    ORK.Game.Difficulty = difficultyID;
    baseEvent.StepFinished(this.next);
    }
    }
    }




Sign In or Register to comment.