Rewarding the player for reaching a kill goal
This recipe is a slight extension to the previous one. There are plenty of ways that the designers may want to reward the player in their title, but in this recipe, we will look at getting the player to kill five Grunts using just melee and then reward them by giving them a SCAR assault rifle.
Getting ready
You should have completed the Creating a kill counter recipe
Then open
My_Level.cry
within the Sandbox
How to do it...
Open the KillCounter AreaTrigger Flow Graph and add in the following flow nodes:
Game:LocalPlayer
Math:Equal
Inventory:AddItem
Set Math:Equal B to 5.
Link the Flow Graph together as follows:
Math:Counter count out to Math:Equal A in
Math:Equal true out to Inventory:AddItem add in
Game:LocalPlayer entityId out to Inventory:AddItem Choose Entity in
The end resulting Flow Graph should look like the following:
Note
The Kill Counter and Kill Goal colored boxes around the nodes are comment boxes. To add a comment box, right-click in...