Set amount of items collected and pathway opens.

ericblak1947

  • Posts: 32
Hey, i read the post on asking questions. And it said to start a new topic for each question. So here's my second.

I have an item that is collected. Gears in this case. How can I make it so that when you collect the set amount of gears a barrier or wall will disappear?

http://www.stencyl.com/game/play/10037

rob1221

  • *
  • Posts: 9473
You obviously are counting the number of gears already.  Make a behavior that kills the barrier actor when gears = required amount.

ericblak1947

  • Posts: 32
You obviously are counting the number of gears already.  Make a behavior that kills the barrier actor when gears = required amount.

Ok I'm on it. Should the code be added to the gear counter behavior or or should it be separate wish me luck! Thanks again!

rob1221

  • *
  • Posts: 9473
If the gear count is a local attribute then you'll have to kill the barrier in that behavior.  If it is a game attribute, then it doesn't really matter.

ericblak1947

  • Posts: 32
Thanks used the game attribute i made, "ReamingGears"

and used the code. used some trail and error but got it working. So simple. Just i little learning curve.