Hi.
I have a quest with kill enemy requirements (Exactly like the kill wasps/spiders ones from the RPG Playground tutorial) and I need to change the amount of killed enemies with either a schematic (Or even by script if not possible with a schematic).
So essentially I need to add 1 to the amount of target enemies killed (Counting towards my quest) without actually killing the enemy in a battle.
  • That's currently not possible via schematics - I'll look into adding new nodes for this.
    You can change the state of a task, e.g. setting it to finished, though.

    Via scripting, you'll first need to get the instance of the task using the task's settings (e.g. via it's asset or it's index/GUID using ORK.QuestTasks.Get) and also use an instance of the combatant:
    QuestTask task = ORK.Game.Quests.GetTask(ORK.QuestTasks.Get(index));
    task.finishRequirements.EnemyKilled(combatant);

    index would be an int value representing the index of the quest task in the editor (you can also use a string with the GUID of the task).
    combatant is a Combatant instance of the combatant that was killed.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • @gamingislove
    Cant requirements type of count be used here instead? Than specific enemy is "killed" you need to increase specific type of count. You could wright just one component whcih do something like this : killed_count_{Combatant.EditorId} +=1. And than whichever task has that count as a requirement shoud be notified of that count changed.
    But I do not really know how count requirements work. So it may be not a valid solution. If they store current count on task first activation and check for count difference it should work I guess.
  • edited July 17
    Yes, you can also use the general Count requirement here - I've answered how they work in your other thread :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.