Frictional Games Forum (read-only)

Full Version: Script issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
void OnStart()
{
AddUseItemCallback("", "holywater", "ScriptArea_2", "HolyWaterFunc", true);
}

void HolyWaterFunc(string &in asItem, string &in asEntity)
{
SetEntityActive("bucketcharged", true);
RemoveItem("holywater");
SetEntityActive("ScriptArea_1", true);
}

I'm 99% sure the script is purrfectly fine, its mainly the item i'm using in the script: "holywater". I want to use it on a script area but "the combination doesn't work" so I'm wondering how I can bypass this. thanks
It looks like it would work. Perhaps there is something else called "holywater" aside for the item?

Try renaming the item in the level editor and everything connected to it in the script to something like "holywater_1", if that isn't being used already.
Ive tried to use items on script areas it does not work you will need a Visible entity.
Ah you have to click on the scriptbox in the leveleditor, and enable "ItemInteraction". Then you can use items on the scriptboxes.
(08-14-2011, 12:31 PM)Rownbear Wrote: [ -> ]Ah you have to click on the scriptbox in the leveleditor, and enable "ItemInteraction". Then you can use items on the scriptboxes.

Oh wow never noticed that!

glad you pointed that out Smile