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

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.

If there isn't a player to assign the variable to.
He wants the script to trigger when someone hits the brick with a pick
So there is a player

He wants the script to trigger when someone hits the brick with a pick
So there is a player

That could be in a simulated space. It isn't necessarily for an in-game gamemode with tools and such.


Scripting?

This is coding...

Scripting?

This is coding...

TorqueScript is a scripting language.

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.

You are not using if properly.

Code: [Select]
if($pickaxe)
{
   //do stuff
}

Is it that hard to give help???

No edit,

Code: [Select]
if($pickaxe == 1)
{
   //do stuff
}