Rattle Ziddler
Terrarian
The sfx when you equipped a full set of necro armor or ninja suit. Sorry if I replied this way. My phone keeps on snapping.
Stuff like that should be possible with this hook:The sfx when you equipped a full set of necro armor or ninja suit. Sorry if I replied this way. My phone keeps on snapping.
For that, I would recommend decompiling the source code and getting familiar with TileObjectData.Okay, Thanks a lot!
And one last thing, How do I make a tile similar to a placed Iron bar? One that can only be placed on top of a tile or another Iron bar and once the tile under it is removed, it will as well will be removed.
Yes, that's possible. The example mod has an example of a laser, actually. Most things are possible with some programming experience.I really need to ask, Is it already possible to create lasers(Last prism, charged blaster, lunar vortex)?
Oh yeah, the Octopus Arm is another example of a laser-like projectile. I was originally thinking the Elemental Laser.Is the octopus's arms are the example?
And yeah, actually I just started C++ when I first ask you about the animation thing (that was when tAPI is still being developed ;P)
Okay, it looks now like this:You can use the following code for that:
This will do exactly what you want it to do.Code:public override bool CanUseItem(Player player) { if (!NPC.downedMoonlord) return false; }
The only code I can find regarding the flamethrower and Dusts is the following:
You'll have to spit through that yourself, though. Note that 'num297 = 6' in this case.Code:if (num297 == 6 || Main.rand.Next(2) == 0) { for (int num298 = 0; num298 < 1; num298++) { int num299 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, num297, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, default(Color), 1f); if (Main.rand.Next(3) != 0 || (num297 == 75 && Main.rand.Next(3) == 0)) { Main.dust[num299].noGravity = true; Main.dust[num299].scale *= 3f; Dust dust50 = Main.dust[num299]; dust50.velocity.X = dust50.velocity.X * 2f; Dust dust51 = Main.dust[num299]; dust51.velocity.Y = dust51.velocity.Y * 2f; } if (this.type == 188) { Main.dust[num299].scale *= 1.25f; } else { Main.dust[num299].scale *= 1.5f; } Dust dust52 = Main.dust[num299]; dust52.velocity.X = dust52.velocity.X * 1.2f; Dust dust53 = Main.dust[num299]; dust53.velocity.Y = dust53.velocity.Y * 1.2f; Main.dust[num299].scale *= num296; if (num297 == 75) { Main.dust[num299].velocity += this.velocity; if (!Main.dust[num299].noGravity) { Main.dust[num299].velocity *= 0.5f; } } } }
As for your second question: Where are you applying the light? On your projectile or on your Dust?
int unVar = 6;
if (unVar == 6 || Main.rand.Next(2) == 0)
{
for (int num298 = 0; num298 < 1; num298++)
{
int num299 = Dust.NewDust(new Vector2(dust.position.X, dust.position.Y), 10, 30, unVar, dust.velocity.X * 0.2f, dust.velocity.Y * 0.2f, 100, default(Color), 1f);
if (Main.rand.Next(3) != 0 || (unVar == 75 && Main.rand.Next(3) == 0))
{
Main.dust[num299].noGravity = true;
Main.dust[num299].scale *= 3f;
Dust dust50 = Main.dust[num299];
dust50.velocity.X = dust50.velocity.X * 2f;
Dust dust51 = Main.dust[num299];
dust51.velocity.Y = dust51.velocity.Y * 2f;
}
if (dust.type == mod.DustType("Flames"))
{
Main.dust[num299].scale *= 1.25f;
}
else
{
Main.dust[num299].scale *= 1.5f;
}
Dust dust52 = Main.dust[num299];
dust52.velocity.X = dust52.velocity.X * 1.2f;
Dust dust53 = Main.dust[num299];
dust53.velocity.Y = dust53.velocity.Y * 1.2f;
Main.dust[num299].scale *= unVar;
if (unVar == 75)
{
Main.dust[num299].velocity += dust.velocity;
if (!Main.dust[num299].noGravity)
{
Main.dust[num299].velocity *= 0.5f;
}
}
}
}
I managed to use the AddLight command, but where do I change the brightness?You can use the following code for that:
This will do exactly what you want it to do.Code:public override bool CanUseItem(Player player) { if (!NPC.downedMoonlord) return false; }
The only code I can find regarding the flamethrower and Dusts is the following:
You'll have to spit through that yourself, though. Note that 'num297 = 6' in this case.Code:if (num297 == 6 || Main.rand.Next(2) == 0) { for (int num298 = 0; num298 < 1; num298++) { int num299 = Dust.NewDust(new Vector2(this.position.X, this.position.Y), this.width, this.height, num297, this.velocity.X * 0.2f, this.velocity.Y * 0.2f, 100, default(Color), 1f); if (Main.rand.Next(3) != 0 || (num297 == 75 && Main.rand.Next(3) == 0)) { Main.dust[num299].noGravity = true; Main.dust[num299].scale *= 3f; Dust dust50 = Main.dust[num299]; dust50.velocity.X = dust50.velocity.X * 2f; Dust dust51 = Main.dust[num299]; dust51.velocity.Y = dust51.velocity.Y * 2f; } if (this.type == 188) { Main.dust[num299].scale *= 1.25f; } else { Main.dust[num299].scale *= 1.5f; } Dust dust52 = Main.dust[num299]; dust52.velocity.X = dust52.velocity.X * 1.2f; Dust dust53 = Main.dust[num299]; dust53.velocity.Y = dust53.velocity.Y * 1.2f; Main.dust[num299].scale *= num296; if (num297 == 75) { Main.dust[num299].velocity += this.velocity; if (!Main.dust[num299].noGravity) { Main.dust[num299].velocity *= 0.5f; } } } }
As for your second question: Where are you applying the light? On your projectile or on your Dust?
If I understand this correctly, that method normally takes values from 0 to 1, so try dividing R, G and B by 255 maybe?I managed to use the AddLight command, but where do I change the brightness?
void LighningAddLight(int i, int j, float R, float G, float B)
the RGB Floats stand for the rgb value, and Int I and J for the position, right?
Yup, what GoldenApple said is probably one of the things you can do.I managed to use the AddLight command, but where do I change the brightness?
void LighningAddLight(int i, int j, float R, float G, float B)
the RGB Floats stand for the rgb value, and Int I and J for the position, right?
Alright, one last thing.Yup, what GoldenApple said is probably one of the things you can do.
Those values (R,G,B - 1,1,1) are full on brightness. You'll need to lower these values for a less intense light. So 1,1,1 is a very large, white light, while 0.2,0.2,0.2 is a smaller white light.
You can either have the bullets spawn NOT at the tip of the weapon (which is the easiest) or you can use the 'Collision.CanHitLine' function to check if there's any obstacle in the way before spawning the projectile... I'm not sure how the vanilla does it, and I don't really have time to look it up atmAlright, one last thing.
No shooting through blocks
Ok, I could spawn the projectiles in the middle of the weapon, but I would have to make them invisible for a short time, is this possible? Working with alpha maybe?You can either have the bullets spawn NOT at the tip of the weapon (which is the easiest) or you can use the 'Collision.CanHitLine' function to check if there's any obstacle in the way before spawning the projectile... I'm not sure how the vanilla does it, and I don't really have time to look it up atm
I think there's a projectile.hide parameter which you can toggle (true/false).Ok, I could spawn the projectiles in the middle of the weapon, but I would have to make them invisible for a short time, is this possible? Working with alpha maybe?
One thing prevents me.I think there's a projectile.hide parameter which you can toggle (true/false).
Maybe you can work with that?
Why would you want to down a loud?how do i down loud?
A Vector2 is basically a convenient way to store two floats in the same object. (A float is a decimal number.)One thing prevents me.
How do I check for position ?
Everytime I try to check for it in a bool parameter (if, while) it says it can not apply on 2 operands, vector2 and int. What should I use then?
That creates another question for me, what is a vector? or vector2?
We are still learning the basics in physics, but my teacher once mentioned something about vectors in the horizontal union(?) or
horizontal throw (dont know how to translate this correctly), when calculating with the x and y speed.
My first idea was, to check for the position, and if its <= 56 (my item width) it should projectile.hide = true, but yeah, how i said, it prevents me because of the checking, and i dont know how to solve it
Did you remember to click the "Setup Dev Environment" button on the installer?Help,
error CS0006: Metadata file 'TerrariaMac.exe' could not be found
error CS0006: Metadata file 'FNA.dll' could not be found