You throw the new files where you had thrown the old files and press overide.Excuse me for my noobness, but how do you update tModloader?
There are no booleans to indicate non-consumability (I hereby patent that word). Thankfully, tModLoader has a very useful solution to that in the form of the ConsumeAmmo hook.For my code, I cant get this ammo reduction to work.
player.ammoCost33 = true;
Help. What is the actually sentence.
public override bool ConsumeAmmo(Player player)
{
if (Main.rand.Next(3) == 0) // Generates a random number between 0 and 3 (0, 1 or 2)
{
return false;
}
return true;
}
I just told my computer to ignore whatever was triggering it, works fine.. still pretty strange though, because it was the windows defender that triggered, not a random anti-virus i had installed myselfWell my computer is telling me there is trojan virus in the files so i guess i cant play with mods anymore R.I.P modded terraria 13-06-2016
There's a projectile in the ExampleMod that does that.I guess it's dumb question and it was discussed a lot, but I can't find it. How can I change the direction of projectile when it collides the tile? Multiplying projectile.direction by -1 does not give the expected result.
I guess it's dumb question and it was discussed a lot, but I can't find it. How can I change the direction of projectile when it collides the tile? Multiplying projectile.direction by -1 does not give the expected result.
I also recommend using Sin Costan's guide to modded projectiles and gun-like items.There's a projectile in the ExampleMod that does that.
You can use the player.direction variable to set the offset correctly. Just multiply your offset by player.direction.And yet another question, I bet, was discussed here, how can I move drill to my hands? I guess something like draworiginoffset could help me, but if I place the drill further on X-axis, while I'm drilling the blocks on the left side of me the drill goes too far on X-axis. I can't find anything about it in example mod.
Why do you think I asked you how to find out where the player looks?You can use the player.direction variable to set the offset correctly. Just multiply your offset by player.direction.
Ah, I assume that didn't work either, then?Why do you think I asked you how to find out where the player looks?![]()
YepAh, I assume that didn't work either, then?
There must be something wrong there somewhere. I'll have to see all of your projectile's code to really see what's happening. If someone else spots the problem before I do, feel free to jump in with a solution.
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
namespace Pack.Projectiles
{
public class PossessedTempliteHammerP : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Possessed Templite Hammer";
projectile.width = 52;
projectile.height = 52;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.aiStyle = 3;
projectile.melee = true;
projectile.tileCollide = false;
projectile.timeLeft = 60000;
projectile.light = 1f;
}
public override void OnHitNPC(NPC n, int damage, float knockback, bool crit)
{
Player player = Main.player[projectile.owner];
player.statLife += 10; //Heals by 10; Can be changed of course
player.HealEffect(10); //Shows a green 10 above your head to show you've been healed; Can be changed of course
if (projectile.ai[1] > 0)
projectile.ai[0] = 0;
if (projectile.ai[0] == 0f)
{
projectile.velocity *= -1;
}
projectile.netUpdate = true;
}
public override void PostAI()
{
Main.NewText("ai[0]: " + projectile.ai[0] + ", ai[1]: " + projectile.ai[1]);
if (projectile.ai[0] == 1)
{
projectile.velocity *= 2;
}
}
}
}
Anybody know the Terraria.ID.ProjectileID for Rockets?
Doesn't destroy tiles | Destroys tiles | |
Small radius | Rocket I | Rocket II |
Large radius | Rocket IIII | Rocket IV |
I assume you're trying to make endless Rocket ammunition items for your Infinity mod, so I'll try to save you some headache (I've been trying to figure it out for a while in my own mod):Anybody know the Terraria.ID.ProjectileID for Rockets?