Computer Science Canada

Is it possible to make truing revert to a previous line of code?

Author:  mr_resi [ Fri Jan 09, 2009 2:16 pm ]
Post subject:  Is it possible to make truing revert to a previous line of code?

Im makin g a Text Based RPG for my summitive im com tech, ive tried processes, loops, ifs, everything but the only thing that even rudemently works for me right now is making a process that checks the position of the user in a loop ( So that it runs over and over) with a delay (so it doesnt put the same thing over and over again), but would really be helpful is just a way for turing to go to a previous line >_>, kind of like in flash when you use gotoAndPlay(); to go to any given frame. Thank you your help is greately appreciated : )

Author:  DemonWasp [ Fri Jan 09, 2009 2:20 pm ]
Post subject:  RE:Is it possible to make truing revert to a previous line of code?

If you mean you want to move execution to a previous line of code, what you need to look into are procedures and functions. They will allow you to "package" up bits of code so you can use that code wherever you need it.

If you mean you want to move to a previous line of text in the output, try Text.Locate().

If you didn't mean either of those things, you need to provide a better explanation.

Author:  Tony [ Fri Jan 09, 2009 4:17 pm ]
Post subject:  Re: Is it possible to make truing revert to a previous line of code?

mr_resi @ Fri Jan 09, 2009 2:16 pm wrote:
kind of like in flash when you use gotoAndPlay()

You can use loops -- http://compsci.ca/v3/viewtopic.php?p=1586


: