Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Tinderboxes don't remove from inventory
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#1
Tinderboxes don't remove from inventory

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:

//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.

Derp.
04-01-2014, 08:45 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Tinderboxes don't remove from inventory

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.

Trying is the first step to success.
04-03-2014, 01:16 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#3
RE: Tinderboxes don't remove from inventory

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.

04-03-2014, 03:31 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#4
RE: Tinderboxes don't remove from inventory

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

Derp.
04-03-2014, 08:09 PM
Find




Users browsing this thread: 1 Guest(s)