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
Switch issues [Solved]
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Switch issues

Let's analyze what's happening here:

First we add a timer named IntroMapa. Where is this added from? I don't see what's executing it. I think we'll need the name of that timer to know how things work here.

Let's assume it's named timer. String sIntro will now be named "timer".
After that it will add a variable to a new variable named what sIntro is. Basically it creates an int variable named "timer" and sets it to 1.

Later, in the switch statement, it checks for the value of sIntro (the int value of the variable named by the string of sIntro). Basically, if int "timer" is 1 (which it should be at this point), it runs case 1. So far so good.

But what happens next? How many times is this timer called? I think that makes the big difference here. Nothing would happen after case 1 if this is the only time, because there's nothing in there that adds another value or calls the timer again.



PS: This will probably be moved to the Development Support section soon.

(This post was last modified: 04-20-2014, 11:51 PM by Mudbill.)
04-20-2014, 11:50 PM
Find


Messages In This Thread
Switch issues [Solved] - by ProyectV - 04-20-2014, 11:01 PM
RE: Switch issues - by Mudbill - 04-20-2014, 11:50 PM
RE: Switch issues - by ProyectV - 04-22-2014, 12:10 AM
RE: Switch issues - by Daemian - 04-22-2014, 02:26 AM
RE: Switch issues - by PutraenusAlivius - 04-22-2014, 08:25 AM
RE: Switch issues - by Mudbill - 04-22-2014, 09:33 AM
RE: Switch issues - by ProyectV - 04-22-2014, 07:20 PM
RE: Switch issues - by Daemian - 04-23-2014, 04:44 AM
RE: Switch issues - by ProyectV - 04-23-2014, 11:08 PM



Users browsing this thread: 1 Guest(s)