Hey Tony, i have wrote a quest to kill the enemies with particular weapon after equipping it, Equipping is also a part of the quest, it's working fine until Equipping and, when it comes to killing, the quest is also getting successful if i kill the enemies with another weapon, but i only want to Kill enemies through the Equipped weapon i mentioned in the quest, is there any way for that through Quest machine itself or i need to hard code to get the weapon name on kill count.
a quick reply will really help
i'm using Unity 2022.3.4f1,
Quest to kill with particular weapon
Re: Quest to kill with particular weapon
Hi,
You'll need to write some code or otherwise configure your game to send a specific message when the player kills the enemy with a particular weapon.
For example, say the quest node requires the player to use the Fire Sword to kill the Ice Elemental.
You could set the quest node's Conditions to listen for "Used Fire Sword To Kill" + "Ice Elemental". Then configure your fire sword to send the message "Used Fire Sword To Kill" + <enemy-name> when the player uses it to kill something.
If you have a similar question for equipping, you could configure the fire sword to send the message "Equipped" + "Fire Sword". Or, more generally, configure your inventory system to send the message "Equipped" + <weapon-name". Then set the quest node's Conditions to listen for "Equipped" + "Fire Sword".
You'll need to write some code or otherwise configure your game to send a specific message when the player kills the enemy with a particular weapon.
For example, say the quest node requires the player to use the Fire Sword to kill the Ice Elemental.
You could set the quest node's Conditions to listen for "Used Fire Sword To Kill" + "Ice Elemental". Then configure your fire sword to send the message "Used Fire Sword To Kill" + <enemy-name> when the player uses it to kill something.
If you have a similar question for equipping, you could configure the fire sword to send the message "Equipped" + "Fire Sword". Or, more generally, configure your inventory system to send the message "Equipped" + <weapon-name". Then set the quest node's Conditions to listen for "Equipped" + "Fire Sword".