Blockland Forums > Modification Help
How to make a weapon plant bricks?
takato14:
--- Quote from: TheArmyGuy on June 30, 2010, 06:33:33 PM ---Uhhm... Scroll?
You need to be more specific.
--- End quote ---
What do you mean be more specific? I want the projectile to deploy bricks. What else is there to say?
TheArmyGuy:
Well then use the brick tool. What else is there to say?
Amade:
Just search for the plant mode's coding. You don't need to know how the entire gun works.
takato14:
--- Quote from: Amade on June 30, 2010, 07:35:45 PM ---Just search for the plant mode's coding. You don't need to know how the entire gun works.
--- End quote ---
I found the plant mode's coding; it doesnt work without the main part of the gun! The plant mode coding itself doesnt function alone, it needs the remainder of the code that is in the main Swiss army gun coding to actually do something.
Think of it like this. A program made using the Microsoft .NET framework cant run without the framework installed. The gun's main code is the framework, and the brick planting mode is the program.
Headcrab Zombie:
As far as the actual brick planting...
Found in a post not too long ago and used it for one of my projects.
--- Code: ---%brick = new fxDtsBrick()
{
position = position;
dataBlock = datablock;
colorID = color;
client = client;
};
%brick.setTrusted(1);
%brick.isPlanted = 1;
%brick.plant();
--- End code ---
Make sure you change position, datablock, colorid, and client to match what you need.
and then use %player.tempbrick.getDatablock() for the datablock
As for other things to make it just like the brick planting tool, I don't know. Your best bet is to do what other people have already said - look at the swiss army gun. Use that as a resource to figure a few things out. Of course you can't just copy and paste it and expect it to work.