Frictional Games Forum (read-only)
[SCRIPT] Tinderboxes don't remove from inventory - 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] Tinderboxes don't remove from inventory (/thread-24977.html)



Tinderboxes don't remove from inventory - Neelke - 04-01-2014

Maybe it's so simple that you can't remove them at all, but well. I've made a capture scene and you get the dragged to cell blah blah. Now, I want the player at this point to lose exactly everything. All puzzle items, lantern, oil and everything.

Everything is removed according to script, except for tinderboxes. I've checked the name some times now and maybe that is still the problem at this point, but I wanna be certain.

Below is basically how it looks in OnStart:

Code:
//Remove EVERYTHING
    RemoveItem("wooden_bucket");
    RemoveItem("wooden_bucket_1");
    RemoveItem("screwdriver");
    RemoveItem("GlassJar");
    RemoveItem("orbpiece_turquoise");
    RemoveItem("Lantern");
    
    SetPlayerLampOil(0.0f);
    
    for(int i=1; i<=40; ++i) RemoveItem("potion_oil_" + i);
    for(int i=1; i<=40; ++i) RemoveItem("potion_health_" + i);
    for(int i=1; i<=100; ++i) RemoveItem("tinderbox_" + i);

A quick response would be lovely due to my lack of time to finish this mod I'm working on. Got school and other maps I need to help ppl with.


RE: Tinderboxes don't remove from inventory - FlawlessHappiness - 04-03-2014

I don't think tinderboxes has a number. There is no tinderbox_1, _2, _3 etc.
It's just tinderbox.
Try calling RemoveItem("tinderbox"); 100 times, and see if that works.


RE: Tinderboxes don't remove from inventory - Mudbill - 04-03-2014

To find out exactly what the name is, add a PickUp function on a tinderbox, then use a DebugMessage script including asEntity to tell you the name the item has. If you then try in the same function to remove asEntity, it should disappear. If not, then I can only assume it's not possible.


RE: Tinderboxes don't remove from inventory - Neelke - 04-03-2014

Didn't work Flawless. I will try your method Mudbill in a second.