adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: wastesedge/scripts/schedules/mapcharacters intr


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: wastesedge/scripts/schedules/mapcharacters intro.py,1.7,1.8
Date: Tue, 20 Aug 2002 13:42:31 -0400

Update of /cvsroot/adonthell/wastesedge/scripts/schedules/mapcharacters
In directory subversions:/tmp/cvs-serv28253/scripts/schedules/mapcharacters

Modified Files:
        intro.py 
Log Message:
ADDED 'quit' command to console
CONVERTED intro schedule to be event-driven
UPDATED talk.py for pausing/resuming events


Index: intro.py
===================================================================
RCS file: 
/cvsroot/adonthell/wastesedge/scripts/schedules/mapcharacters/intro.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** intro.py    19 Aug 2002 19:59:06 -0000      1.7
--- intro.py    20 Aug 2002 17:42:28 -0000      1.8
***************
*** 2,6 ****
  #  $Id$
  #
! #  (C) Copyright 2001 Kai Sterker <address@hidden>
  #  Part of the Adonthell Project http://adonthell.linuxgames.com
  #
--- 2,6 ----
  #  $Id$
  #
! #  (C) Copyright 2001/2002 Kai Sterker <address@hidden>
  #  Part of the Adonthell Project http://adonthell.linuxgames.com
  #
***************
*** 21,61 ****
      def __init__ (self, mapcharacterinstance):
          self.myself = mapcharacterinstance
! 
          adonthell.gamedata_get_quest ("demo").set_val ("intro_on", 1)
  
! 
!     def run (self):
!         myself = self.myself
!         talk = adonthell.gamedata_get_quest ("demo").get_val ("intro_on")
! 
!         # -- first talk to talan to get into the inn
!         if talk == 1:
!             talan = adonthell.gamedata_get_character ("Talan Wendth")
!             talan.launch_action (myself)
! 
!             adonthell.gamedata_get_quest ("demo").set_val ("intro_on", 2)
! 
!         # -- open the gate
!         elif talk == 2:
!         
!             # -- start music
!             adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
!             adonthell.audio_play_background (0)
!             adonthell.audio_set_schedule ("in_game")
!             adonthell.audio_set_schedule_active (1)
                          
!             self.open_gate ()
  
!             adonthell.gamedata_get_quest ("demo").set_val ("intro_on", 0)
!             myself.set_goal (10, 18, adonthell.STAND_EAST)
  
!         # -- move in and finally enable keyboard control
!         else:
!             if myself.follow_path () == 1:
!                 myself.set_schedule ("keyboard_control")
!                 self.close_gate ()
!                 myself.go_east ()
!                 talan = adonthell.gamedata_get_character ("Talan Wendth")
!                 talan.time_callback_string ("3t", "walk")
  
  
--- 21,55 ----
      def __init__ (self, mapcharacterinstance):
          self.myself = mapcharacterinstance
!         self.myself.set_callback (self.goal_reached)
          adonthell.gamedata_get_quest ("demo").set_val ("intro_on", 1)
  
!     # -- first talk to talan to get into the inn
!     def talk_to_talan (self):
!         talan = adonthell.gamedata_get_character ("Talan Wendth")
!         talan.launch_action (self.myself)
! 
!     # -- finally enter the inn
!     def enter_inn (self):
!         # -- start music
!         adonthell.audio_load_background (0, "audio/at-demo-5.ogg")
!         adonthell.audio_play_background (0)
!         adonthell.audio_set_schedule ("in_game")
!         adonthell.audio_set_schedule_active (1)
                          
!         self.open_gate ()
  
!         adonthell.gamedata_get_quest ("demo").set_val ("intro_on", 0)
!         self.myself.set_goal (10, 18, adonthell.STAND_EAST)
  
!     # -- inside the inn
!     def goal_reached (self):
!         talan = adonthell.gamedata_get_character ("Talan Wendth")
!         talan.time_callback_string ("3t", "walk")
!         
!         self.myself.set_callback (None)
!         self.myself.set_schedule ("keyboard_control")
!         self.myself.set_schedule_active (1)
!         self.close_gate ()
!         self.myself.go_east ()
  
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]