Subversion Repositories vaca_plus

Rev

Rev 1 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 25
1
/*
1
/*
2
--------------------------------------------------------------------------------
2
--------------------------------------------------------------------------------
3
Duke Caribbean: Life's A Beach
3
Duke Caribbean: Life's A Beach
4
By Joris Weimar
4
By Joris Weimar
5
© 1997 Sunstorm Interactive
5
© 1997 Sunstorm Interactive
6
--------------------------------------------------------------------------------
6
--------------------------------------------------------------------------------
7
Duke Caribbean: Life's A Beach Plus
7
Duke Caribbean: Life's A Beach Plus
8
By Hendricks266
8
By Hendricks266
9
--------------------------------------------------------------------------------
9
--------------------------------------------------------------------------------
10
// CON Files for the 'Duke Carribean Add-on' by SunStorm Interactive
10
// CON Files for the 'Duke Carribean Add-on' by SunStorm Interactive
11
//
11
//
12
// Actor - DRAGON - Sprite #3585
12
// Actor - DRAGON - Sprite #3585
13
//
13
//
14
// --- Resources ---
14
// --- Resources ---
15
//
15
//
16
// Sounds:
16
// Sounds:
17
// Dragon Dying Sound     - DRAGDIE.WAV
17
// Dragon Dying Sound     - DRAGDIE.WAV
18
// Dragon Hurt Sound      - DRAGHURT.WAV
18
// Dragon Hurt Sound      - DRAGHURT.WAV
19
// Dragon Roam Sound      - DRAGROAM.WAV
19
// Dragon Roam Sound      - DRAGROAM.WAV
20
// Dragon Wake-up Sound   - DRAGRECO.WAV
20
// Dragon Wake-up Sound   - DRAGRECO.WAV
21
//
21
//
22
// Art:
22
// Art:
23
// 5 * 5 frame(s)         - Dragon Bouncing Animation
23
// 5 * 5 frame(s)         - Dragon Bouncing Animation
24
// 6 * 1 frame(s)         - Dragon Dying Animation  
24
// 6 * 1 frame(s)         - Dragon Dying Animation  
25
// 5 * 2 frame(s)         - Dragon Firing Animation
25
// 5 * 2 frame(s)         - Dragon Firing Animation
26
*/
26
*/
27
 
27
 
28
action DRAGONBOUNCE   0 2 5 1 20
28
action DRAGONBOUNCE   0 2 5 1 20
29
action DRAGONBOUNCE2 10 3 5 1 20
29
action DRAGONBOUNCE2 10 3 5 1 20
30
action DRAGONSHOOT   31 2 5 1 40
30
action DRAGONSHOOT   31 2 5 1 40
31
action DRAGONSHRUNK   0 5 5 1 30
31
action DRAGONSHRUNK   0 5 5 1 30
32
action DRAGONGROW     0 1 5
32
action DRAGONGROW     0 1 5
33
action DRAGONFROZEN  31 1 5 1
33
action DRAGONFROZEN  31 1 5 1
34
action DRAGONDEAD    30 1 1
34
action DRAGONDEAD    30 1 1
35
action DRAGONDYING   25 6 1 1 12
35
action DRAGONDYING   25 6 1 1 12
36
 
36
 
37
move DRAGONSPEED 60 0
37
move DRAGONSPEED 60 0
38
move DRAGONFLEE  300 0
38
move DRAGONFLEE  300 0
39
move DRAGONSTOPPED
39
move DRAGONSTOPPED
40
move DRAGONBACK  -250 0
40
move DRAGONBACK  -500 0
41
move DRAGONSHRUNKSPEED 50 0
41
move DRAGONSHRUNKSPEED 50 0
42
 
42
 
43
ai AIDRAGONFLEE     DRAGONBOUNCE DRAGONFLEE fleeenemy randomangle
43
ai AIDRAGONFLEE     DRAGONBOUNCE DRAGONFLEE fleeenemy randomangle
44
ai AIDRAGONBOUNCESEE  DRAGONBOUNCE DRAGONSPEED seekplayer
44
ai AIDRAGONBOUNCESEE  DRAGONBOUNCE DRAGONSPEED seekplayer
45
ai AIDRAGONBOUNCE  DRAGONBOUNCE DRAGONSPEED faceplayer
45
ai AIDRAGONBOUNCE  DRAGONBOUNCE DRAGONSPEED faceplayer
46
 
46
 
47
ai AIDRAGONFLEE2     DRAGONBOUNCE2 DRAGONFLEE fleeenemy randomangle
47
ai AIDRAGONFLEE2     DRAGONBOUNCE2 DRAGONFLEE fleeenemy randomangle
48
ai AIDRAGONBOUNCESEE2  DRAGONBOUNCE2 DRAGONSPEED faceplayerslow
48
ai AIDRAGONBOUNCESEE2  DRAGONBOUNCE2 DRAGONSPEED faceplayerslow
49
ai AIDRAGONBOUNCE2  DRAGONBOUNCE2 DRAGONSPEED faceplayer
49
ai AIDRAGONBOUNCE2  DRAGONBOUNCE2 DRAGONSPEED faceplayer
50
 
50
 
51
ai AIDRAGONSHOOT   DRAGONSHOOT DRAGONSTOPPED faceplayer
51
ai AIDRAGONSHOOT   DRAGONSHOOT DRAGONSTOPPED faceplayer
52
ai AIDRAGONSHRUNK  DRAGONBOUNCE DRAGONSHRUNKSPEED fleeenemy randomangle
52
ai AIDRAGONSHRUNK  DRAGONBOUNCE DRAGONSHRUNKSPEED fleeenemy randomangle
53
ai AIDRAGONGROW    DRAGONGROW DRAGONSPEED faceplayer
53
ai AIDRAGONGROW    DRAGONGROW DRAGONSPEED faceplayer
54
ai AIDRAGONDYING   DRAGONDYING  DRAGONBACK 
54
ai AIDRAGONDYING   DRAGONDYING  DRAGONBACK 
55
// faceplayer
55
// faceplayer
56
 
56
 
57
state dragon_jibs
57
state dragon_jibs
58
  state scrap3_colorchange
58
  state scrap3_colorchange
59
  debris SCRAP1 20
59
  debris SCRAP1 20
60
  debris SCRAP2 22
60
  debris SCRAP2 22
61
  debris SCRAP3 22
61
  debris SCRAP3 22
62
  debris SCRAP4 22
62
  debris SCRAP4 22
63
  debris SCRAP5 22
63
  debris SCRAP5 22
64
  getlastpal
64
  getlastpal
65
  spritepal 0
65
  spritepal 0
66
  state standard_jibs
66
  state standard_jibs
67
  getlastpal
67
  getlastpal
68
ends
68
ends
69
 
69
 
70
state dragongrowstate
70
state dragongrowstate
71
  ifcount 32
71
  ifcount 32
72
  {
72
  {
73
    state scrap3_colorchange
73
    state scrap3_colorchange
74
    debris SCRAP1 20
74
    debris SCRAP1 20
75
    debris SCRAP2 22
75
    debris SCRAP2 22
76
    debris SCRAP3 22
76
    debris SCRAP3 22
77
    debris SCRAP4 22
77
    debris SCRAP4 22
78
    debris SCRAP5 22
78
    debris SCRAP5 22
79
    getlastpal
79
    getlastpal
80
    spritepal 0
80
    spritepal 0
81
    guts JIBS4 24
81
    guts JIBS4 24
82
    guts JIBS6 28
82
    guts JIBS6 28
83
    getlastpal
83
    getlastpal
84
    addkills 1
84
    addkills 1
85
    sound SQUISHED
85
    sound SQUISHED
86
    sound PIPEBOMB_EXPLODE
86
    sound PIPEBOMB_EXPLODE
87
    sound BALLEXPLODE
87
    sound BALLEXPLODE
88
    hitradius 2048 60 70 80 90
88
    hitradius 2048 60 70 80 90
89
    spawn BLOODPOOL
89
    spawn BLOODPOOL
90
    spawn EXPLOSION2
90
    spawn EXPLOSION2
91
    killit
91
    killit
92
  }
92
  }
93
  else
93
  else
94
  {
94
  {
95
    sizeto 84 100
95
    sizeto 84 100
96
    break
96
    break
97
  }
97
  }
98
ends
98
ends
99
 
99
 
-
 
100
 
100
state dragondeathanglecode
101
state dragondeathanglecode
101
      ifvare temp3 0
102
      ifvare temp3 -1
102
        {
103
        {
103
          getplayer[THISACTOR].i temp // gets the player's ID
-
 
104
          getactor[temp].x x2
-
 
105
          getactor[temp].y y2
-
 
106
          getactor[THISACTOR].x x
-
 
107
          getactor[THISACTOR].y y // gets the coordinates of the player and dragon
104
          getactor[THISACTOR].htang temp // get the angle of the projectile that hit the dragon
108
          subvarvar x2 x
-
 
109
          subvarvar y2 y
-
 
110
          getangle temp2 x2 y2 // calculates the angle to face the player
105
          ifvarg temp 1024 subvar temp 1024 else addvar temp 1024 // turn the angle around to face the projectile
-
 
106
 
111
          setvar temp 0
107
          setvar temp2 0
112
          randvar temp 256 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
108
          randvar temp2 128 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
113
          ifrnd 128 addvarvar temp2 temp else subvarvar temp2 temp
109
          ifrnd 128 addvarvar temp temp2 else subvarvar temp temp2
-
 
110
 
114
          setactor[THISACTOR].ang temp2 // sets the angle, just in time for movement
111
          getactor[THISACTOR].ang temp3 // pass this along to EVENT_ANIMATESPRITES
-
 
112
 
115
          setvar temp3 1
113
          setactor[THISACTOR].ang temp // sets the angle, just in time for movement
116
        }
114
        }
117
ends
115
ends
118
 
116
 
119
state DRAGONBOUNCESTATESEE
117
state DRAGONBOUNCESTATESEE
120
  ifbulletnear ai AIDRAGONFLEE
118
  ifbulletnear ai AIDRAGONFLEE
121
 
119
 
122
  ifai AIDRAGONBOUNCESEE
120
  ifai AIDRAGONBOUNCESEE
123
    {
121
    {
124
    ifactioncount 2
122
    ifactioncount 2
125
      {
123
      {
126
      sound DRAGONROAM
124
      sound DRAGONROAM
127
      ai AIDRAGONBOUNCESEE2
125
      ai AIDRAGONBOUNCESEE2
128
      }
126
      }
129
    }
127
    }
130
    else ifactioncount 3 ai AIDRAGONBOUNCESEE
128
    else ifactioncount 3 ai AIDRAGONBOUNCESEE
131
 
129
 
132
  ifpdistl 6000
130
  ifpdistl 6000
133
    {
131
    {
134
    ifrnd 5
132
    ifrnd 5
135
      ifp palive
133
      ifp palive
136
        ai AIDRAGONSHOOT
134
        ai AIDRAGONSHOOT
137
   }
135
   }
138
 
136
 
139
  ifcansee nullop else ai AIDRAGONBOUNCE
137
  ifcansee nullop else ai AIDRAGONBOUNCE
140
ends
138
ends
141
 
139
 
142
state DRAGONBOUNCESTATE
140
state DRAGONBOUNCESTATE
143
  ifai AIDRAGONBOUNCE
141
  ifai AIDRAGONBOUNCE
144
    {
142
    {
145
      ifactioncount 2
143
      ifactioncount 2
146
        {
144
        {
147
          sound DRAGONROAM
145
          sound DRAGONROAM
148
          ai AIDRAGONBOUNCE2
146
          ai AIDRAGONBOUNCE2
149
        }
147
        }
150
    }
148
    }
151
  else
149
  else
152
    {
150
    {
153
      ifactioncount 3 ai AIDRAGONBOUNCE
151
      ifactioncount 3 ai AIDRAGONBOUNCE
154
    }
152
    }
155
 
153
 
156
  ifcansee 
154
  ifcansee 
157
    ifrnd 64
155
    ifrnd 64
158
      ifcanshoottarget
156
      ifcanshoottarget
159
        {
157
        {
160
          ifp palive ai AIDRAGONSHOOT
158
          ifp palive ai AIDRAGONSHOOT
161
          else ai AIDRAGONBOUNCESEE
159
          else ai AIDRAGONBOUNCESEE
162
        }
160
        }
163
ends
161
ends
164
 
162
 
165
 
163
 
166
state DRAGONSHOOTSTATE
164
state DRAGONSHOOTSTATE
167
      ifcount 8 nullop
165
      ifcount 8 nullop
168
 else ifcount 7
166
 else ifcount 7
169
        {
167
        {
170
          shoot RPG
168
          shoot RPG
171
          sound DRAGONSHOOTING
169
          sound DRAGONSHOOTING
172
        }
170
        }
173
 
171
 
174
 ifactioncount 2
172
 ifactioncount 2
175
   {
173
   {
176
     ifrnd 100
174
     ifrnd 100
177
       {
175
       {
-
 
176
         ifcansee nullop else ai AIDRAGONBOUNCESEE // This line should make the dragon smarter.
178
         resetcount
177
         resetcount
179
         resetactioncount
178
         resetactioncount
180
       }
179
       }
181
     else
180
     else
182
       {
181
       {
183
         ai AIDRAGONBOUNCESEE
182
         ai AIDRAGONBOUNCESEE
184
         resetcount
183
         resetcount
185
         resetactioncount
184
         resetactioncount
186
       }
185
       }
187
   }
186
   }
188
ends
187
ends
189
 
188
 
190
state DRAGONHITSTATE
189
state DRAGONHITSTATE
191
   ifdead
190
   ifdead
192
     {
191
     {
193
       state random_wall_jibs
192
       state random_wall_jibs
194
 
193
 
195
       ifwasweapon GROWSPARK
194
       ifwasweapon GROWSPARK
196
         {
195
         {
197
           sound ACTOR_GROWING
196
           sound ACTOR_GROWING
198
           ai AIDRAGONGROW
197
           ai AIDRAGONGROW
199
           break
198
           break
200
         }
199
         }
201
 
200
 
202
      ifwasweapon FREEZEBLAST
201
      ifwasweapon FREEZEBLAST
203
        {
202
        {
204
          sound SOMETHINGFROZE
203
          sound SOMETHINGFROZE
205
          spritepal 1
204
          spritepal 1
206
          move 0
205
          move 0
207
          action DRAGONFROZEN
206
          action DRAGONFROZEN
208
          strength 0
207
          strength 0
209
          break
208
          break
210
        }
209
        }
211
       addkills 1
210
       addkills 1
212
 
211
 
213
      ifwasweapon RADIUSEXPLOSION
212
      ifwasweapon RADIUSEXPLOSION
214
        {
213
        {
215
          sound SQUISHED
214
          sound SQUISHED
216
          state dragon_jibs
215
          state dragon_jibs
217
          killit
216
          killit
218
        }
217
        }
219
 else ifwasweapon RPG
218
 else ifwasweapon RPG
220
        {
219
        {
221
          sound SQUISHED
220
          sound SQUISHED
222
          state dragon_jibs
221
          state dragon_jibs
223
          killit
222
          killit
224
        }
223
        }
225
      else
224
      else
226
        {
225
        {
227
          ai AIDRAGONDYING
-
 
228
          state dragondeathanglecode
226
          state dragondeathanglecode
-
 
227
          ai AIDRAGONDYING
229
        }
228
        }
230
 
229
 
231
      sound BALLEXPLODE
230
      sound BALLEXPLODE
232
     }
231
     }
233
   else
232
   else
234
     {
233
     {
235
       sound DRAGONPAIN
234
       sound DRAGONPAIN
236
       state random_wall_jibs
235
       state random_wall_jibs
237
       debris SCRAP3 5
236
       debris SCRAP3 5
238
 
237
 
239
       ifwasweapon SHRINKSPARK
238
       ifwasweapon SHRINKSPARK
240
         {
239
         {
241
           sound ACTOR_SHRINKING
240
           sound ACTOR_SHRINKING
242
           ai AIDRAGONSHRUNK
241
           ai AIDRAGONSHRUNK
243
         }
242
         }
244
  else ifwasweapon GROWSPARK sound EXPANDERHIT
243
  else ifwasweapon GROWSPARK sound EXPANDERHIT
245
  else ifrnd 64 ifai AIDRAGONSHOOT nullop else ai AIDRAGONSHOOT
244
  else ifrnd 64 ifai AIDRAGONSHOOT nullop else ai AIDRAGONSHOOT
246
     }
245
     }
247
ends
246
ends
248
 
247
 
249
state DRAGONFLEESTATE
248
state DRAGONFLEESTATE
250
  ifai AIDRAGONFLEE
249
  ifai AIDRAGONFLEE
251
    {
250
    {
252
      ifactioncount 2
251
      ifactioncount 2
253
        {
252
        {
254
          sound DRAGONROAM
253
          sound DRAGONROAM
255
          ai AIDRAGONFLEE2
254
          ai AIDRAGONFLEE2
256
        }
255
        }
257
    }
256
    }
258
  else
257
  else
259
    {
258
    {
260
      ifactioncount 3 ai AIDRAGONFLEE
259
      ifactioncount 3 ai AIDRAGONFLEE
261
    }
260
    }
262
 
261
 
263
  ifrnd 15 ai AIDRAGONBOUNCE
262
  ifrnd 15 ai AIDRAGONBOUNCE
264
ends
263
ends
265
 
264
 
266
state DRAGONSHRINKSTATE
265
state DRAGONSHRINKSTATE
267
  ifcount SHRUNKDONECOUNT ai AIDRAGONBOUNCE
266
  ifcount SHRUNKDONECOUNT ai AIDRAGONBOUNCE
268
  else
267
  else
269
    ifcount SHRUNKCOUNT
268
    ifcount SHRUNKCOUNT
270
      sizeto 42 50
269
      sizeto 42 50
271
  else
270
  else
272
    state genericshrunkcode
271
    state genericshrunkcode
273
ends
272
ends
274
 
273
 
275
 
274
 
276
state DRAGONDYINGSTATE
275
state DRAGONDYINGSTATE
277
  ifactioncount 6
276
  ifactioncount 6
278
    {
277
    {
279
      state rf
278
      state rf
280
      iffloordistl 8 sound THUD
279
      iffloordistl 8 sound THUD
281
      action DRAGONDEAD
280
      action DRAGONDEAD
282
      move DRAGONSTOPPED
281
      move DRAGONSTOPPED
283
      break
282
      break
284
    }
283
    }
285
  else move DRAGONBACK
284
  else move DRAGONBACK
286
// Note: Because of the way actioncounts work, "ifactioncount" really asks if it is at that value or greater.
285
// Note: Because of the way actioncounts work, "ifactioncount" really asks if it is at that value or greater.
287
//       That's why we have to put bigger ones first, with "else" statements.
286
//       That's why we have to put bigger ones first, with "else" statements.
288
ends
287
ends
289
 
288
 
290
useractor enemy DRAGON DRAGONSTRENGTH DRAGONBOUNCE
289
useractor enemy DRAGON DRAGONSTRENGTH DRAGONBOUNCE
291
   fall
290
  fall
292
   cstator 257
291
  cstator 257
-
 
292
  setactor[THISACTOR].mdflags 16
-
 
293
 
-
 
294
  ifai 0
-
 
295
  {
-
 
296
    setvar temp3 -1
-
 
297
    ai AIDRAGONBOUNCE
-
 
298
  }
293
 
299
 
294
   state checksquished
300
   state checksquished
295
 
301
 
296
      ifaction DRAGONDEAD
302
      ifaction DRAGONDEAD
297
        {
303
        {
298
          cstat 0
304
          cstat 0
299
          ifrespawn
305
          ifrespawn
300
            ifcount RESPAWNACTORTIME
306
            ifcount RESPAWNACTORTIME
301
              {
307
              {
302
                spawn TRANSPORTERSTAR
308
                spawn TRANSPORTERSTAR
303
                cstat 257
309
                cstat 257
304
                strength DRAGONSTRENGTH
310
                strength DRAGONSTRENGTH
-
 
311
                setvar temp3 -1
305
                ai AIDRAGONBOUNCE
312
                ai AIDRAGONBOUNCE
306
              }
313
              }
307
            else
314
            else
308
              {
315
              {
309
                strength 0
316
                strength 0
310
                ifhitweapon
317
                ifhitweapon
311
   	          ifwasweapon RADIUSEXPLOSION
318
   	          ifwasweapon RADIUSEXPLOSION
312
   	            {
319
   	            {
313
   	              sound BALLEXPLODE
320
   	              sound BALLEXPLODE
314
                      state dragon_jibs
321
                      state dragon_jibs
315
                      killit
322
                      killit
316
                    }
323
                    }
317
                break
324
                break
318
              }
325
              }
319
        }
326
        }
320
 else ifaction DRAGONFROZEN
327
 else ifaction DRAGONFROZEN
321
        {
328
        {
322
         // setactor[THISACTOR].mdflags 2
329
         // setactor[THISACTOR].mdflags 2
323
          ifcount THAWTIME
330
          ifcount THAWTIME
324
            {
331
            {
325
              ai AIDRAGONBOUNCE
332
              ai AIDRAGONBOUNCE
326
              getlastpal
333
              getlastpal
327
            }
334
            }
328
     else ifcount FROZENDRIPTIME ifrnd 8 spawn WATERDRIP
335
     else ifcount FROZENDRIPTIME ifrnd 8 spawn WATERDRIP
329
 
336
 
330
          ifhitweapon
337
          ifhitweapon
331
            {
338
            {
332
              ifwasweapon FREEZEBLAST
339
              ifwasweapon FREEZEBLAST
333
                {
340
                {
334
                  strength 0
341
                  strength 0
335
                  break
342
                  break
336
                }
343
                }
337
              addkills 1
344
              addkills 1
338
      
345
      
339
              lotsofglass 30
346
              lotsofglass 30
340
              ifrnd 84 spawn BLOODPOOL
347
              ifrnd 84 spawn BLOODPOOL
341
              sound GLASS_BREAKING
348
              sound GLASS_BREAKING
342
              killit
349
              killit
343
            }
350
            }
344
          ifp pfacing
351
          ifp pfacing
345
            ifpdistl FROZENQUICKKICKDIST
352
            ifpdistl FROZENQUICKKICKDIST
346
              pkick
353
              pkick
347
          break
354
          break
348
        }
355
        }
349
 
356
 
350
     ifai AIDRAGONDYING
357
     ifai AIDRAGONDYING
351
       {
358
       {
352
         state DRAGONDYINGSTATE
359
         state DRAGONDYINGSTATE
353
         break
360
         break
354
       }
361
       }
355
 
362
 
356
  ifhitweapon state DRAGONHITSTATE
363
  ifhitweapon
357
 
-
 
358
  ifai 0 ai AIDRAGONBOUNCE
364
    state DRAGONHITSTATE
359
 
365
 
360
      ifai AIDRAGONGROW state dragongrowstate
366
      ifai AIDRAGONGROW state dragongrowstate
361
 else ifai AIDRAGONSHRUNK state DRAGONSHRINKSTATE
367
 else ifai AIDRAGONSHRUNK state DRAGONSHRINKSTATE
362
 else
368
 else
363
  {
369
  {
364
    sizeat 42 50
370
    sizeat 42 50
365
      ifai AIDRAGONBOUNCESEE state DRAGONBOUNCESTATESEE
371
      ifai AIDRAGONBOUNCESEE state DRAGONBOUNCESTATESEE
366
 else ifai AIDRAGONBOUNCE state DRAGONBOUNCESTATE
372
 else ifai AIDRAGONBOUNCE state DRAGONBOUNCESTATE
367
 else ifai AIDRAGONSHOOT state DRAGONSHOOTSTATE
373
 else ifai AIDRAGONSHOOT state DRAGONSHOOTSTATE
368
 else ifai AIDRAGONFLEE state DRAGONFLEESTATE
374
 else ifai AIDRAGONFLEE state DRAGONFLEESTATE
369
 else ifai AIDRAGONFLEE2 state DRAGONFLEESTATE
375
 else ifai AIDRAGONFLEE2 state DRAGONFLEESTATE
370
 else ifai AIDRAGONBOUNCESEE2 state DRAGONBOUNCESTATESEE
376
 else ifai AIDRAGONBOUNCESEE2 state DRAGONBOUNCESTATESEE
371
 else ifai AIDRAGONBOUNCE2 state DRAGONBOUNCESTATE
377
 else ifai AIDRAGONBOUNCE2 state DRAGONBOUNCESTATE
372
  }
378
  }
373
enda
379
enda
374
 
380
 
375
useractor notenemy DRAGONDEATH 0
381
useractor notenemy DRAGONDEATH 0
-
 
382
  setvar temp3 -1
-
 
383
  setactor[THISACTOR].mdflags 16
-
 
384
 
376
  addvar temp 1
385
  addvar temp 1
-
 
386
  ifvare temp 1
-
 
387
  {
-
 
388
    getplayer[THISACTOR].i temp2 // get the player's ID
-
 
389
 
-
 
390
    // get the coordinates of the player and dragon
-
 
391
    getactor[temp2].x x2
-
 
392
    getactor[temp2].y y2
-
 
393
    getactor[THISACTOR].x x
-
 
394
    getactor[THISACTOR].y y 
-
 
395
 
-
 
396
    subvarvar x2 x
-
 
397
    subvarvar y2 y
-
 
398
    getangle y x2 y2 // calculates the angle to face the player
-
 
399
 
-
 
400
    setactor[THISACTOR].htang y
-
 
401
  }
377
  ifvare temp 26
402
  ifvare temp 26
378
    {
403
  {
379
      setvar temp 0
404
    setvar temp 0
380
      getactor[THISACTOR].x x
405
    getactor[THISACTOR].x x
381
      subvar x 1536
406
    subvar x 1536
382
      setactor[THISACTOR].x x
407
    setactor[THISACTOR].x x
383
      sizeat 42 50
408
    sizeat 42 50
384
      state random_wall_jibs
409
    state random_wall_jibs
385
      sound BALLEXPLODE
410
    sound BALLEXPLODE
386
      cactor DRAGON
411
    cactor DRAGON
387
      state dragondeathanglecode
412
    state dragondeathanglecode
388
      ai AIDRAGONDYING
413
    ai AIDRAGONDYING
389
    }
414
  }
390
enda
415
enda
391
 
416