I'm trying to read the value of the StuffCollected int so that when it reaches 25 the level will change. Not too sure about it and could use a nudge in the right direction. Here's what I have so far, not sure where to go from here.
This code seems ok - are you having any problem? Anyway, be aware that a static variable is created and initialized when the program begins, and survive till the end of the program. Due to this, its value will still be 25 when Level2 is loaded, thus you must zero it at Start or Awake if you plan to use it again.
where GuiScript is the above script's name.
answered Feb 03 '12 at 01:45 AM