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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tinderbox Scripting Question
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#2
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
Find


Messages In This Thread
Tinderbox Scripting Question - by Kyle - 05-26-2011, 02:02 AM
RE: Tinderbox Scripting Question - by Anxt - 05-26-2011, 03:12 AM
RE: Tinderbox Scripting Question - by Kyle - 05-26-2011, 03:25 AM



Users browsing this thread: 1 Guest(s)