[Tutor] My first script within a game program

Glen Wheeler wheelege@tsn.cc
Sat, 13 Oct 2001 22:07:49 +1000

  Howdy Tony,

  Next time your posting, please keep to plain text and indent your code -
thanks :)
  Anywho, onto your question...

metarFlag = 0

def Main(dt):
  global metarFlag
  if (metarFlag == 0):
    NoticeToUser(" loading InfoMetar Weather v1.0", 10.0)
    metarFlag = 1

> With this script placed in the program, I can successfully load the
InfoMetar.txt when I load my first situation. The
> question is that if I want to load a new situation I need to add the
EndSituation() function somewhere in the script in
> order to reset, I suspect, some flag so that when I start a new situation
the loadMetar() function is loaded again.
> Presently, I need to restart the Game whenever I want to load a new
situation.  I hope I have provided enough clues.
> Unfortunately, I don't have any docs, thus the difficulty. tony cervone

  No docs?  Try www.python.org for all the latest documentation that comes
with python.  It sounds like all you need to do is add a question to the
user when they want to quit - or perhaps make the 'Reset Situation' option
in a menu somewhere?  Or perhaps as a keyboard shortcut?  The code should be
simple enough (sans GUI :) and all you would need to do is then call
EndSituation() once they respond.
  I can't help but feel I'm missing the point here.  Could you please repost
with a bit more detail?