tModLoader Royal Gel Type Accessory

Zman350x

Steampunker
Hi, I want to create an accessory similar to the royal gel, where it makes a certain type of enemy friendly. I know how to make an accessory, although I was wondering about how to make the enemies friendly? Any ideas?
 
Under UpdateAccessory:
Code:
player.npcTypeNoAggro[x] = true;
For making the player friendly to just normal Zombies, replace x with either 3 or NPCID.Zombie.
Edit: Make sure that if you're trying to make the player friendly to all Zombies, you include the ID's for the other types in lines following.
Ex:
Code:
player.npcTypeNoAggro[3] = true;
player.npcTypeNoAggro[430] = true;
[etc.]
 
Back
Top Bottom