~ubuntu-branches/ubuntu/precise/egoboo-data/precise

« back to all changes in this revision

Viewing changes to modules/catacomb1.mod/objects/bossdoor.obj/script.txt

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-04-25 10:20:11 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100425102011-1aosouybjkexdg9v
Tags: 1:2.7.7-1
* New Upstream Release
* Switch to debhelper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//The different states:
 
2
//0: Closed
 
3
//1: Open
 
4
//------------------------------------------------------------------
 
5
//Just in case
 
6
IfSpawned
 
7
  tmpargument = passage
 
8
  ClosePassage
 
9
  tmpargument = ACTIONMJ            
 
10
  DoAction                      //Closed animation
 
11
 
 
12
 
 
13
//------------------------------------------------------------------
 
14
// Someone cast an unlock spell
 
15
IfOrdered
 
16
  tmpx = selforder
 
17
  tmpy = 491                    // The unique code for an unlock order
 
18
  IfXIsEqualToY
 
19
    tmpargument = 0                 // Is it closed?
 
20
    IfStateIs
 
21
      tmpargument = 2
 
22
      SendMessageNear           //Tell it dint work
 
23
      PlaySound                 //Funky sound
 
24
 
 
25
//------------------------------------------------------------------
 
26
//Open if both keys are used
 
27
IfTimeOut
 
28
  tmpargument = passage
 
29
  SetTargetToWhoeverIsInPassage
 
30
  tmpargument = [KEYB]
 
31
  IfTargetHasItemID
 
32
    CostTargetItemID
 
33
      tmpargument = passage
 
34
      OpenPassage                       //Yep
 
35
      tmpargument = 0
 
36
      SendMessageNear
 
37
  tmpargument = 5
 
38
  SetTime
 
39
 
 
40
 
 
41
//------------------------------------------------------------------
 
42
// Handle the animation and sound
 
43
KeepAction
 
44
tmpargument = passage   // Is the passage clear?
 
45
IfPassageOpen                   
 
46
  tmpargument = 0                 
 
47
  IfStateIs                             //Don't loop      
 
48
    tmpargument = ACTIONMG          
 
49
    DoAction    
 
50
      tmpargument = 1               
 
51
      SetState                                
 
52
      tmpargument = 0                 
 
53
      PlayFullSound                                           
 
54
 
 
55
//------------------------------------------------------------------
 
56
End                             // Finished with this character
 
57
//------------------------------------------------------------------