Anxt
Senior Member
Posts: 588
Threads: 12
Joined: Mar 2011
Reputation:
10
|
RE: Tinderbox Scripting Question
For each tinderbox throughout your map, add an interact callback which adds to a global var, then do the following:
for(int i = 0; i >= GetGlobalVarInt("Tindercount"); i++)
{ RemoveItem("tinderbox_"+i);
}
Then, say AddGlobalVarInt("Tindercount", -1) *if that works*
Then use
for(int i = 0; i > GetGlobalVarInt("Tindercount"); i++)
{ GiveItem("tinderbox_"+i);
}
It may not work that way, but I suppose it is worth a shot.
Edit: If subtracting one from Tindercount doesn't work that way, you could set up two callbacks for the same object, one of which only works if Tindercount is >=1, and name it Tindercount2 or something, then use that for the GiveItem function.
(This post was last modified: 05-26-2011, 03:15 AM by Anxt.)
|
|
| 05-26-2011, 03:12 AM |
|