Sin Costan
Eye of Cthulhu
Check my tutorial, it's under North Pole Like Weapons.how would you create a spear type weapon?
Do you mean a custom item that drops from a custom mob? or make a custom item drop from an already existing mob?
Check my tutorial, it's under North Pole Like Weapons.how would you create a spear type weapon?
Do you mean a custom item that drops from a custom mob? or make a custom item drop from an already existing mob?
Inside Providing Help for Accessories by Berberborscing...How do i make it so that for an accessory, on being hit you explode? I am assuming that i could make a custom bomb projectile and spawn it in with postHit, and just have it have a time of 1 so that on its death it explodes, but is there a way to make it so upon hit it produces a nonharmful explosion?
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using TAPI;
using Terraria;
namespace InternalModName.Items //replace InternalModName with the internal name of your mod
{
public class ItemName : ModItem //replace ItemName with the name of your accessory
{
public override void Effects(Player p) //Where it says "p" is the variable used to represent "player". In this case, every p stands for player. This is called when the accessory is on.
{
p.noFallDmg = true; //This is where an effect from the list goes.
}
public override void DamageNPC(Player p, NPC n, int hitDir, ref int damage, ref float knockback, ref bool crit, ref float critMult) //This is called when the player attacks an NPC
{
p.statLife += 5; //any effect goes here, this gives the player 5 life upon attack of any NPC
}
public override void DamagePlayer(NPC n, Player p, int hitDir, ref int damage, ref bool crit, ref float critMult) //This is called when the player is damaged by an NPC
{
p.panic = true; //This would give the player the panic buff when hit by the NPC
}
}
}
{
"displayName": "Explosion",
"size": [64, 64],
"aiStyle": 49,
"timeLeft": 60,
"friendly": true,
"hostile": false,
"tileCollide": false,
"ignoreWater": true,
"penetrate": -1,
}
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using TAPI;
using Terraria;
namespace InternalModName.Items
{
public class AccessoryName : ModItem
{
public override void DamagePlayer(NPC n, Player p, int hitDir, ref int damage, ref bool crit, ref float critMult)
{
Projectile.NewProjectile(p.Center.X - 32, p.Center.Y - 32, 0, 0, "InternalModName:Explosion", 60, 10, Main.myPlayer); //Maybe switch Main.myPlayer to item.owner?
//I'm just approximating the position of the projectile... As just setting the projectile to p.Center does not work. Projectile's position is determined by the top left corner of the texture I beleive...
}
}
}
If you need help with spriting I would go to the general mod discussion section, its a good place to post requests and things like that, also once I get some free time I may be able to help you sprite.So I have no idea where to ask this but where should I go if I need help with spriting? I'm assuming the W.I.P page but still kinda unsure.
Alright thank you for the information. And I would appreciate any help mainly spriting, lets just say it's not my strong suit.If you need help with spriting I would go to the general mod discussion section, its a good place to post requests and things like that, also once I get some free time I may be able to help you sprite.
Sure! just send me a Pm with what you need, and when I can(if I can) I will sprite itAlright thank you for the information. And I would appreciate any help mainly spriting, lets just say it's not my strong suit.
There is no event to listen for as far as I'm aware. But it shouldn't be too difficult to implement. I would use a nullable byte to store the currently selected item. Then have code run each update, if your variable is null, you store the currently selected slot to your variable. If your variable is not null, you compare its value to the currently selected item slot. If the two are equal, do nothing. If they differ, run your code, then store the newly selected item slot to your variable.is there any code that gets called when you switch off an item in your inventory slot? like say I have an item in slot 1, is there something I can do to make the code activate when I switch to another slot (2,3,4 etc)?
private byte? _previouslySelectedItem;
public override Update() {
if (_previouslySelectedItem == null) {
_previouslySelectedItem = Main.localPlayer.selectedItem;
} else if (_previouslySelectedItem != Main.localPlayer.selectedItem) {
SlotSwitched(); // Your custom code;
_previouslySelectedItem = Main.localPlayer.selectedItem;
}
}
If you have a few questions you may PM me and I'll do my best to answer in a timely manner. But if you think the solution may be useful for others to see as well, then you can ask the question in this thread.Ok, I need a serious CS coder at the moment! Just need to ask questions! Anyone willing to help please?
With JSON, yes, CS, sadly no.are you able to help me ?
@Everybody,could you help me please? Do u have Skype?I'm decent at CS code.
@Everybody,could you help me please? Do u have Skype?
That's more than ok of course! I will be back home soon, so I can't do it yet. My username is Sumowrestler00 !Ye, but I can't video chat, if that's fine with you.
That's more than ok of course! I will be back home soon, so I can't do it yet. My username is Sumowrestler00 !
U gotta be kidding . Don't worry. What can you do with CS? Can you make biomes and bosses and events???Actually, I just realized I can't voice chat either; T_T