Frictional Games Forum (read-only)
Script issue - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Script issue (/thread-9744.html)



Script issue - SLAMnesia - 08-13-2011

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


RE: Script issue - Kyle - 08-13-2011

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.


RE: Script issue - Tesseract - 08-14-2011

Ive tried to use items on script areas it does not work you will need a Visible entity.


RE: Script issue - Rownbear - 08-14-2011

Ah you have to click on the scriptbox in the leveleditor, and enable "ItemInteraction". Then you can use items on the scriptboxes.


RE: Script issue - Tesseract - 08-15-2011

(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