![]() ![]() Public override void OnChatButtonClicked(bool firstButton, ref bool openShop) //Allows you to make something happen whenever a button is clicked on this town NPC's chat window. Public override void SetChatButtons(ref string button, ref string button2) //Allows you to set the text for the buttons that appear on this town NPC's chat window.īutton = "Buy Potions" //this defines the buy button name Public override string TownNPCName() //Allows you to give this town NPC any name when it spawns Return true //so when a house is available the npc will spawn Public override bool CheckConditions(int left, int right, int top, int bottom) //Allows you to define special conditions required for this town NPC's house If (NPC.downedBoss1) //so after the EoC is killed Public override bool CanTownNPCSpawn(int numTownNPCs, int money) //Whether or not the conditions have been met for this town NPC to be able to move into town. = 4 //this defines the party hat positionĪnimationType = NPCID.Guide //this copy the guide animation = 10 //this defines the npc atack chance ![]() = 30 //this defines the npc attack speed = 3 //this is the attack type, 0 (throwing), 1 (shooting), or 2 (magic). ![]() = 150 //this defines the npc danger detect range Main.npcFrameCount = 25 //this defines how many frames the npc sprite sheet has Npc.knockBackResist = 0.5f //the npc knockback resistance Npc.DeathSound = SoundID.NPCDeath1 //the npc sound when he dies Npc.HitSound = SoundID.NPCHit1 //the npc sound when is hit Npc.aiStyle = 7 //this is the npc ai style, 7 is Pasive Ai Npc.friendly = true //this defines if the npc can hur you or not() Npc.townNPC = true //This defines if the npc is a town Npc or not Public bool Autoload(ref string name, ref string texture, ref string altTextures)ĭisplayName.SetDefault("God of Riddles") //the name displayed when hovering over the npc ingame. Namespace GodOfRiddles.NPCs //We need this to basically indicate the folder where it is to be read from, so you the texture will load correctly ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |