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.
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!