Blockland Forums > Help

Scripting Help (PLEASE HELP)

Pages: << < (5/5)

Port:


--- Quote from: Soildaa on June 14, 2012, 04:04:42 PM ---Scripting?

This is coding...

--- End quote ---

TorqueScript is a scripting language.

Axolotl:


--- Quote from: bluemcblox on June 12, 2012, 11:02:19 AM ---I need help with some scripting.  I am trying to create a ore.  I just need help with how to exactly make it.

I am planning to make it inside the special section in bricks, containing copper, tin, iron, coal, and a few others.

Right now, I want it to be something like


--- Code: ---$health = 20;
(insert someway to detect a hit from a pickaxe)
if ($pickaxe) = 1;  // (copper)
$health - 1
if ($pickaxe) = 2; // (iron)
$health - 2

--- End code ---
And so on...
Also, I want it to have a 2x2 round brick.  (to make it easier)

I already have pickaxes that work, but I will have to add the script that follows along with the ores.

--- Code: ---$pickaxe = 1
--- End code ---

Mind if someone could help me?

Also, if you think that this is pointless, stupid, and I shouldn't do this, fine.
Haters gonna hate.

--- End quote ---

You are not using if properly.


--- Code: ---if($pickaxe)
{
   //do stuff
}

--- End code ---

Is it that hard to give help???

Axolotl:

No edit,


--- Code: ---if($pickaxe == 1)
{
   //do stuff
}

--- End code ---


Pages: << < (5/5)

Go to full version