Standalone [1.3] tModLoader - A Modding API

Sure here:
Code:
public override bool UseItem(Item item, Player player)
        {
            //Main.NewText("USE");
            Main.NewText(Main.projectile.Length.ToString());
                        for(int m = 0; m < Main.projectile.Length; m++)
                        {
                            if(Main.projectile[m].type == mod.ProjectileType("CustomProjectile"))
                            {
                                CustomProjectile pro = (CustomProjectile)Main.projectile[m].modProjectile;
                                pro.test();
                            }
                    }
            return true;

        }
the Main.NewText are just for testing
Are you testing it on a ranged weapon (one that shoots)? If so, UseItem is not being called for ranged weapons (in my experience). You'll want to use the Shoot function for that instead.
 
Are you testing it on a ranged weapon (one that shoots)? If so, UseItem is not being called for ranged weapons (in my experience). You'll want to use the Shoot function for that instead.
Oh I tried changing UseItem with Shoot and it worked. Thanks :D
 
At the moment no. I'll add that to the to-do list.


Ok then, i will wait for update

One last question though: can we create a some sort of "placeholder" recipe, that can be used with any item?For example, you craft one random item with Super Essence of Ultimate Power of Gods and it gets, lets say, prefix?
 
Is there any update on the Chest sync bug in multiplayer? (happens regardless of the used mod, eg. Thorium / Tremor). This is currently preventing me to play it multiplayer. Other than that, thanks for building this great addon for Terraria!
 
soo nobody knows how to fix my error ?
Nope, other people have reported it, but Bluemagic123 and I haven't been able to reproduce it yet.
[DOUBLEPOST=1456947287,1456947245][/DOUBLEPOST]
my mod browser does not work and I don't know how to fix it:confused:
If you aren't on Windows, it's not working yet. If you are on Windows, firewall?
[DOUBLEPOST=1456947687][/DOUBLEPOST]
Nevermind the last post, I really need to know how to make projectiles shoot out in a cirlce.
BTW, I posted worldgen code a few pages back, didn't I?

Shoot in a circle? Use Geometry.

Code:
            Vector2 speed = new Vector2(speedX, speedY);
            for (int i = 0; i < 10; i++)
            {
                Vector2 newSpeed = speed.RotatedBy((i * 2 * Math.PI) / 10);
                Projectile.NewProjectile(position.X, position.Y, newSpeed.X, newSpeed.Y, type, damage, knockBack, player.whoAmI);
            }
---> should work. 10 being the number of projectiles, of course.

Is there any update on the Chest sync bug in multiplayer? (happens regardless of the used mod, eg. Thorium / Tremor). This is currently preventing me to play it multiplayer. Other than that, thanks for building this great addon for Terraria!
It's fixed, but not released.
 
Nope, other people have reported it, but Bluemagic123 and I haven't been able to reproduce it yet.
[DOUBLEPOST=1456947287,1456947245][/DOUBLEPOST]
If you aren't on Windows, it's not working yet. If you are on Windows, firewall?
[DOUBLEPOST=1456947687][/DOUBLEPOST]
BTW, I posted worldgen code a few pages back, didn't I?

Shoot in a circle? Use Geometry.

Code:
            Vector2 speed = new Vector2(speedX, speedY);
            for (int i = 0; i < 10; i++)
            {
                Vector2 newSpeed = speed.RotatedBy((i * 2 * Math.PI) / 10);
                Projectile.NewProjectile(position.X, position.Y, newSpeed.X, newSpeed.Y, type, damage, knockBack, player.whoAmI);
            }
---> should work. 10 being the number of projectiles, of course.


It's fixed, but not released.
thanks
[DOUBLEPOST=1456949009][/DOUBLEPOST]Wait, where do I put the geometry code? I want a boss to shoot it.
 
Holly F*cking :red: are the game trolling me...
5345.PNG

help...

Problem: is the same as before but now with worlds !?
 
when i disable a mod that has a npc in it,and go back to a world that has a modded npc in it .the world wil fail to load.
 
Hey! So i'm currently experiencing an issue where some modded NPC's disappear when hit. I saw this as a listed known bug and was wondering if there was an earlier version of tmodloader where this issue didnt exist, or if there was some sort of work-around for it. Thanks!
 
Wait, where do I put the geometry code? I want a boss to shoot it.
In the AI somewhere. It all depends on the AI code you've written.

when i disable a mod that has a npc in it,and go back to a world that has a modded npc in it .the world wil fail to load.
You mean town NPC? I'll check it out.
Problem: is the same as before but now with worlds !?
I had that issue happen to me so I disabled all of my mods and gradually re-enabled them and that seemed to fix it.
Sounds like some mod isn't loading data correctly. If you list the mods enabled, we can figure out which one caused it.
Hey! So i'm currently experiencing an issue where some modded NPC's disappear when hit. I saw this as a listed known bug and was wondering if there was an earlier version of tmodloader where this issue didnt exist, or if there was some sort of work-around for it. Thanks!
No, the issue in previous versions was that nothing worked. Again, listing the specific NPC that disappear will help diagnose the problem.
 
No, the issue in previous versions was that nothing worked. Again, listing the specific NPC that disappear will help diagnose the problem.

It seems to be the enemies from the Tremor mod that drop Invar pieces if I'm not mistaken, but occasionally some other mobs will do the same, but definitely not as often. I was told this was a tmodloader bug but I'm not entirely sure.
 
Back
Top Bottom