Blockland Forums > Modification Help

Need help scripting.

Pages: << < (19/31) > >>

Treynolds416:

Elm, you don't really need that last argument. It only exists for the use of really big objects like interiors

elm:


--- Quote from: zefoo on June 27, 2012, 07:56:03 PM ---So if I want to see if %targetName = nothing then would i do  this?

--- Code: ---if(%targetname = "")
--- End code ---
?

--- End quote ---

No, that would set it to nothing. To compare strings use $

so

if(%string1 $= %string2)

or

if(%string1 !$= %string2)

Ipquarx:


--- Quote from: zefoo on June 27, 2012, 07:56:03 PM ---So if I want to see if %targetName = nothing then would i do  this?

--- Code: ---if(%targetname = "")
--- End code ---
?

--- End quote ---
Targetname would never be blank, if we're still taking about the Raycasting.

zefoo:


--- Quote from: elm on June 27, 2012, 07:47:58 PM ---Oh, didn't read that aiming part, lol.


Edit:

To shoot a raycast, here is the code below:

//%player should be defined above


--- End quote ---
What do you mean by that?



--- Quote from: Ipquarx on June 27, 2012, 07:58:04 PM ---Targetname would never be blank, if we're still taking about the Raycasting.

--- End quote ---
Lets just say what if %potato was blank
Would that mean I would do

--- Code: ---if(%potato $= "")
{

}
--- End code ---
?

elm:


--- Quote from: zefoo on June 27, 2012, 08:00:55 PM ---What do you mean by that?

--- End quote ---

It means that their should already be a %player that is defined, above that code.

Pages: << < (19/31) > >>

Go to full version