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
Scripting advice: Filling a bucket by three consecutive Item Callbacks.
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#2
RE: Scripting advice: Filling a bucket by three consecutive Item Callbacks.

Someone else can probably help better, but putting a use item callback in the hps of each water level, and then having it add to a GLOBAL variable each time would allow you to do it in any order. In my experience global variables work pretty much exactly like local ones except they can be called in other maps. Which actually makes me wonder why local ones even exist (I'm sure there's a reason) If the bucket will be in your inventory the whole time I really see no good reason why you'd need to make a seperate model for each "fill level" Just have the description of the bucket in your inventory be "There's not enough water in it yet" and when you've filled it all 3 times, remove it and replace it with a bucket in the inventory that says "I have enough water."

If you're having trouble getting the bucket from one level to work in a callback on another level (You may be doing something wrong as I'm pretty sure items work in callbacks regardless of where you got the item) you could try letting the player "click" on the water area instead of using the bucket. or even better, just have a script area around the water so that when the player gets close it just does it automatically and says "You put the water into the bucket" (I find players tend to get giddy when the game does something for them like that.)

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
10-12-2013, 04:21 PM
Find


Messages In This Thread
RE: Scripting advice: Filling a bucket by three consecutive Item Callbacks. - by DeAngelo - 10-12-2013, 04:21 PM



Users browsing this thread: 1 Guest(s)