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
Syntax for case-switch?
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Syntax for case-switch?

Here's the section on switch-case structures from the AngelCode documentation.

http://www.angelcode.com/angelscript/sdk...ts.html#if


As far as I know AngelCode doesn't support case identifiers beyond integers. For example, I'm pretty sure you can't use case 'j' like you could in native C++.

Note that you will want to end each case code block with a break; -- unless you want to continue through the rest of the cases. You can exclude the break; statement if you wanted to make a cascading code block which adds extra code based on which value is input, but that's a little more semantically advanced than would normally be needed for something like an Amnesia custom story.

(This post was last modified: 04-29-2012, 02:11 AM by palistov.)
04-29-2012, 02:11 AM
Find


Messages In This Thread
Syntax for case-switch? - by FragdaddyXXL - 04-29-2012, 02:02 AM
RE: Syntax for case-switch? - by palistov - 04-29-2012, 02:11 AM
RE: Syntax for case-switch? - by FragdaddyXXL - 04-29-2012, 02:21 AM



Users browsing this thread: 1 Guest(s)