Author Topic: Scripting Help (PLEASE HELP)  (Read 982 times)

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: [Select]
$health = 20;
(insert someway to detect a hit from a pickaxe)
if ($pickaxe) = 1;  // (copper)
$health - 1
if ($pickaxe) = 2; // (iron)
$health - 2
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: [Select]
$pickaxe = 1
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.


Haters gonna hate.

Mostly because people cannot see the "coding help" section.

What
Your first failure: $Pickaxe

What
Your first failure: $Pickaxe

That's a valid variable name.

That's a valid variable name.
But it has no sense
I guess he wants to look whether the player has a pickaxe of type 1 or type 2, then he can't use a global variable

But it has no sense
I guess he wants to look whether the player has a pickaxe of type 1 or type 2, then he can't use a global variable

You're assuming a ton of things right now.

VCE is very good for this too

Nevermind...  I don't know how to script really.


Nevermind...  how to script really.
Made your post better.

Mostly because people cannot see the "coding help" section.
Most people who are actually any help with coding look there pretty often.

You're assuming a ton of things right now.
He means that if the pickaxe is gonna be for a player, then their can't be a global variable, it wouldn't work unless you have so many different kinds of variables and having another var for it to work with from the client, otherwise you'd have to set a client's variable for the pickaxe and the brick so it doesn't mess everything else up.



Tell us a use if it's a global var and not for a player