Tell us a use if it's a global var and not for a player
If there isn't a player to assign the variable to.
He wants the script to trigger when someone hits the brick with a pickSo there is a player
Made your post better.
Scripting?This is coding...
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 likeCode: [Select]$health = 20;(insert someway to detect a hit from a pickaxe)if ($pickaxe) = 1; // (copper)$health - 1 if ($pickaxe) = 2; // (iron)$health - 2And 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: [Select]$pickaxe = 1Mind if someone could help me?Also, if you think that this is pointless, stupid, and I shouldn't do this, fine.Haters gonna hate.
$health = 20;(insert someway to detect a hit from a pickaxe)if ($pickaxe) = 1; // (copper)$health - 1 if ($pickaxe) = 2; // (iron)$health - 2
$pickaxe = 1
if($pickaxe){ //do stuff}
if($pickaxe == 1){ //do stuff}