Code viewer
Cat_SeqCond_HasBadgeEquipped
#Kismet
Check if the player has a badge equipped!
Use this to check if the player has the Hookshot, Camera, or any of the other badges equipped!
It's just drag and drop in your classes folder and it'll work, find it in the Pawn tab in the Kismet Conditions!
Made by CatCube, but with from Nerketur cuz they helped with another script that I used some code from for this!
Enjoy!
class Cat_SeqCond_HasBadgeEquipped extends SequenceCondition; var Actor Target; var() class<Hat_Ability_Automatic> WhichBadge; event Activated() { local bool BadgeEquipped; local Hat_PlayerController PC; PC = Hat_PlayerController(Target); // cast if (PC.GetLoadout().LoadoutHasBadge(WhichBadge) != INDEX_NONE) { BadgeEquipped = true; } OutputLinks[BadgeEquipped ? 0 : 1].bHasImpulse = true; } defaultproperties { ObjName="Has Badge Equipped" ObjCategory="Pawn" OutputLinks(0)=(LinkDesc="True") OutputLinks(1)=(LinkDesc="False") VariableLinks(0)=(ExpectedType=class'SeqVar_Object',LinkDesc="Target",PropertyName=Target,MinVars=1,MaxVars=1) WhichBadge = Hat_Ability_Automatic }