Skip to content

[Mod] On The Fly Projectile Changing

CloudHopper edited this page Aug 14, 2011 · 2 revisions

##What do you mean? I created this after being annoyed by having to close Terraria, change what an item shoots, and open it again. Using this, all you have to type is "/custShoot " and you will be given a Minishark that shoots that projectile. I haven't tested to see if it shoots the same thing when you reload your character, but I wouldn't count on it.

##Where's this code? case "custShoot": var customShoot = new Item(); customShoot.SetDefaults("Minishark"); customShoot.shoot = Convert.ToInt32(parameter); customShoot.useAmmo = 0; Main.player[Main.myPlayer].GetItem(Main.myPlayer, customShoot); break;
Too messy? http://pastebin.com/r75BD6Z3

##Where does it go? It goes in your ModClass.cs file, along with all the other chat commands.

##Can I change it? Yeah, you could change the name "Minishark" to something else, like "Star Cannon". Personally, I use the Minishark because I like the look of it.

###Misc: If anyone wants it, I also made one for tiles. It does basically the same thing.
case "custTile": var customTile = new Item(); customTile.SetDefaults("Ebonstone Block"); customTile.createTile = Convert.ToInt32(parameter); customTile.stack = 99; Main.player[Main.myPlayer].GetItem(Main.myPlayer, customTile); break; Too messy? http://pastebin.com/aqGLxN7A

~CloudHopper

Clone this wiki locally