Sin Costan
Eye of Cthulhu
...okay (what?)
It's a .zip file containing a completed version of most of the items found in the tutorial.
...okay (what?)
ThanksIt's a .zip file containing a completed version of most of the items found in the tutorial.
This is a great tutorial, cleared up a few things for me, Thanks!It's a .zip file containing a completed version of most of the items found in the tutorial.
I'm not sure whether you mentioned this, but it seems that the projectile's "maxUpdates" json property determines how many times it updates in one tick. This is mostly used for projectiles that collide with tiles and need to have a velocity higher than 16, because if a velocity is higher than 16, it has a chance to move past a tile. For example, the shadow beam projectile has a really high maxUpdates number to make it seem instantaneous. (I spent forever scouring the source code just now to find out what makes it move so fast)
Anyways, this tutorial seems pretty nice!
How do you animate a projectile?
In order to animate a projectile, you actually have to set its frame in the AI method (kind of annoying how there's no SelectFrame method). There are also some differences from how NPCs select their frame. NPCs use a Rectangle as their frame variable, but projectiles simply use an integer to specify which frame; also the projectile's frameCounter is an integer instead of a double.How do you animate a projectile?
Is it possible to make a gun that turns slowly? Or a chargeable gun?I currently am trying to figure that out, but when I figue it out, I'll probably be updating this tutorial with how to.
If, by chargeable you mean it gets more powerful the longer you hold down your mouse button: yes it is, Sin Costan helped me with the same for my mod I can send you the code in a conversation if you want, although it needs some workIs it possible to make a gun that turns slowly? Or a chargeable gun?
ThanksIf, by chargeable you mean it gets more powerful the longer you hold down your mouse button: yes it is, Sin Costan helped me with the same for my mod I can send you the code in a conversation if you want, although it needs some work
In order to animate a projectile, you actually have to set its frame in the AI method (kind of annoying how there's no SelectFrame method). There are also some differences from how NPCs select their frame. NPCs use a Rectangle as their frame variable, but projectiles simply use an integer to specify which frame; also the projectile's frameCounter is an integer instead of a double.
Nonono, is it THAT hard?? Coin launcher has animated projectiles... BTW Is it possible to copy vanilla items from the game itself? Or are there "Mods" that has the vanilla items?I am unhappy to report that animating projectiles is the hardest thing in the universe... Yes you need the frameCounter and frame integers, but there is a lot more than that. I tried a lot of things to make it work, but I can't seem to make it work. But, I have seen in Grox's mod that he as an animated projectile, but I think it requires Basemod for it to work.
Nonono, is it THAT hard?? Coin launcher has animated projectiles... BTW Is it possible to copy vanilla items from the game itself? Or are there "Mods" that has the vanilla items?
Hm, really? Animating projectiles works perfectly fine for my Mini Paladin minion... just as another note, aiStyles might mess with animation frames.I am unhappy to report that animating projectiles is the hardest thing in the universe... Yes you need the frameCounter and frame integers, but there is a lot more than that. I tried a lot of things to make it work, but I can't seem to make it work. But, I have seen in Grox's mod that he as an animated projectile, but I think it requires Basemod for it to work.
please help!
i made a magic weapon and it wont shoot!
it makes the correct sound and uses mana but wont shoot!
heres my code of weapon
{
"displayName": "Bubble Shooter",
"size": [64, 64],
"maxStack": 1,
"value": [0, 0, 270, 40],
"rare": 3,
"useStyle": 5,
"useAnimation": 10,
"useTime": 5,
"useSound": 13,
"damage": 112,
"knockback": 13,
"autoReuse": true,
"noMelee": true,
"shoot": "MPT:Bubble",
"shootSpeed": 14,
"magic": true,
"mana": 13,
"recipes":
[{
"items": { "Bubble Gun": 1, "Chlorophyte Bar": 15, "Illegal Gun Parts": 1 },
"tiles": [ "Anvil" ],
"creates": 1
}]
}
and heres my projectile
{
"displayName": "Bubble",
"size": [32, 32],
"aiStyle": 0,
"timeLeft": 3600,
"friendly": true,
"hostile": false,
"tileCollide": true,
"damage": 32,
"magic": true
please help
"shoot": "MPT:Bubble",
You mean like splash potions? I left that code on one of the pages of Everybody's mod somewhereThis is such a useful guide! I'd like to ask though,how can I make a weapon that fires a custom ray/beam? Y'know, my own texture, colours, etc.RESOLVED
how do I make a throwable weapon similar to the holy water, but inflict a de-buff?