Subversion Repositories vaca_plus

Rev

Rev 25 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25 Rev 73
Line 97... Line 97...
97
  }
97
  }
98
ends
98
ends
99
 
99
 
100
 
100
 
101
state dragondeathanglecode
101
state dragondeathanglecode
102
      ifvare temp3 -1
102
      ifvare vaca_temp3 -1
103
        {
103
        {
104
          getactor[THISACTOR].htang temp // get the angle of the projectile that hit the dragon
104
          getactor[THISACTOR].htang vaca_temp // get the angle of the projectile that hit the dragon
105
          ifvarg temp 1024 subvar temp 1024 else addvar temp 1024 // turn the angle around to face the projectile
105
          ifvarg vaca_temp 1024 subvar vaca_temp 1024 else addvar vaca_temp 1024 // turn the angle around to face the projectile
106
 
106
 
107
          setvar temp2 0
107
          setvar vaca_temp2 0
108
          randvar temp2 128 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
108
          randvar vaca_temp2 128 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
109
          ifrnd 128 addvarvar temp temp2 else subvarvar temp temp2
109
          ifrnd 128 addvarvar vaca_temp vaca_temp2 else subvarvar vaca_temp vaca_temp2
110
 
110
 
111
          getactor[THISACTOR].ang temp3 // pass this along to EVENT_ANIMATESPRITES
111
          getactor[THISACTOR].ang vaca_temp3 // pass this along to EVENT_ANIMATESPRITES
112
 
112
 
113
          setactor[THISACTOR].ang temp // sets the angle, just in time for movement
113
          setactor[THISACTOR].ang vaca_temp // sets the angle, just in time for movement
114
        }
114
        }
115
ends
115
ends
116
 
116
 
117
state DRAGONBOUNCESTATESEE
117
state DRAGONBOUNCESTATESEE
118
  ifbulletnear ai AIDRAGONFLEE
118
  ifbulletnear ai AIDRAGONFLEE
Line 291... Line 291...
291
  cstator 257
291
  cstator 257
292
  setactor[THISACTOR].mdflags 16
292
  setactor[THISACTOR].mdflags 16
293
 
293
 
294
  ifai 0
294
  ifai 0
295
  {
295
  {
296
    setvar temp3 -1
296
    setvar vaca_temp3 -1
297
    ai AIDRAGONBOUNCE
297
    ai AIDRAGONBOUNCE
298
  }
298
  }
299
 
299
 
300
   state checksquished
300
   state checksquished
301
 
301
 
Line 306... Line 306...
306
            ifcount RESPAWNACTORTIME
306
            ifcount RESPAWNACTORTIME
307
              {
307
              {
308
                spawn TRANSPORTERSTAR
308
                spawn TRANSPORTERSTAR
309
                cstat 257
309
                cstat 257
310
                strength DRAGONSTRENGTH
310
                strength DRAGONSTRENGTH
311
                setvar temp3 -1
311
                setvar vaca_temp3 -1
312
                ai AIDRAGONBOUNCE
312
                ai AIDRAGONBOUNCE
313
              }
313
              }
314
            else
314
            else
315
              {
315
              {
316
                strength 0
316
                strength 0
Line 377... Line 377...
377
 else ifai AIDRAGONBOUNCE2 state DRAGONBOUNCESTATE
377
 else ifai AIDRAGONBOUNCE2 state DRAGONBOUNCESTATE
378
  }
378
  }
379
enda
379
enda
380
 
380
 
381
useractor notenemy DRAGONDEATH 0
381
useractor notenemy DRAGONDEATH 0
382
  setvar temp3 -1
382
  setvar vaca_temp3 -1
383
  setactor[THISACTOR].mdflags 16
383
  setactor[THISACTOR].mdflags 16
384
 
384
 
385
  addvar temp 1
385
  addvar vaca_temp 1
386
  ifvare temp 1
386
  ifvare vaca_temp 1
387
  {
387
  {
388
    getplayer[THISACTOR].i temp2 // get the player's ID
388
    getplayer[THISACTOR].i vaca_temp2 // get the player's ID
389
 
389
 
390
    // get the coordinates of the player and dragon
390
    // get the coordinates of the player and dragon
391
    getactor[temp2].x x2
391
    getactor[vaca_temp2].x vaca_x2
392
    getactor[temp2].y y2
392
    getactor[vaca_temp2].y vaca_y2
393
    getactor[THISACTOR].x x
393
    getactor[THISACTOR].x vaca_x
394
    getactor[THISACTOR].y y 
394
    getactor[THISACTOR].y vaca_y 
395
 
395
 
396
    subvarvar x2 x
396
    subvarvar vaca_x2 vaca_x
397
    subvarvar y2 y
397
    subvarvar vaca_y2 vaca_y
398
    getangle y x2 y2 // calculates the angle to face the player
398
    getangle vaca_y vaca_x2 vaca_y2 // calculates the angle to face the player
399
 
399
 
400
    setactor[THISACTOR].htang y
400
    setactor[THISACTOR].htang vaca_y
401
  }
401
  }
402
  ifvare temp 26
402
  ifvare vaca_temp 26
403
  {
403
  {
404
    setvar temp 0
404
    setvar vaca_temp 0
405
    getactor[THISACTOR].x x
405
    getactor[THISACTOR].x vaca_x
406
    subvar x 1536
406
    subvar vaca_x 1536
407
    setactor[THISACTOR].x x
407
    setactor[THISACTOR].x vaca_x
408
    sizeat 42 50
408
    sizeat 42 50
409
    state random_wall_jibs
409
    state random_wall_jibs
410
    sound BALLEXPLODE
410
    sound BALLEXPLODE
411
    cactor DRAGON
411
    cactor DRAGON
412
    state dragondeathanglecode
412
    state dragondeathanglecode