Subversion Repositories vaca_plus

Compare Revisions

Regard whitespace Rev 25 → Rev 73

/vaca_plus/VDragon.con
99,18 → 99,18
 
 
state dragondeathanglecode
ifvare temp3 -1
ifvare vaca_temp3 -1
{
getactor[THISACTOR].htang temp // get the angle of the projectile that hit the dragon
ifvarg temp 1024 subvar temp 1024 else addvar temp 1024 // turn the angle around to face the projectile
getactor[THISACTOR].htang vaca_temp // get the angle of the projectile that hit the dragon
ifvarg vaca_temp 1024 subvar vaca_temp 1024 else addvar vaca_temp 1024 // turn the angle around to face the projectile
 
setvar temp2 0
randvar temp2 128 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
ifrnd 128 addvarvar temp temp2 else subvarvar temp temp2
setvar vaca_temp2 0
randvar vaca_temp2 128 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
ifrnd 128 addvarvar vaca_temp vaca_temp2 else subvarvar vaca_temp vaca_temp2
 
getactor[THISACTOR].ang temp3 // pass this along to EVENT_ANIMATESPRITES
getactor[THISACTOR].ang vaca_temp3 // pass this along to EVENT_ANIMATESPRITES
 
setactor[THISACTOR].ang temp // sets the angle, just in time for movement
setactor[THISACTOR].ang vaca_temp // sets the angle, just in time for movement
}
ends
 
293,7 → 293,7
 
ifai 0
{
setvar temp3 -1
setvar vaca_temp3 -1
ai AIDRAGONBOUNCE
}
 
308,7 → 308,7
spawn TRANSPORTERSTAR
cstat 257
strength DRAGONSTRENGTH
setvar temp3 -1
setvar vaca_temp3 -1
ai AIDRAGONBOUNCE
}
else
379,32 → 379,32
enda
 
useractor notenemy DRAGONDEATH 0
setvar temp3 -1
setvar vaca_temp3 -1
setactor[THISACTOR].mdflags 16
 
addvar temp 1
ifvare temp 1
addvar vaca_temp 1
ifvare vaca_temp 1
{
getplayer[THISACTOR].i temp2 // get the player's ID
getplayer[THISACTOR].i vaca_temp2 // get the player's ID
 
// get the coordinates of the player and dragon
getactor[temp2].x x2
getactor[temp2].y y2
getactor[THISACTOR].x x
getactor[THISACTOR].y y
getactor[vaca_temp2].x vaca_x2
getactor[vaca_temp2].y vaca_y2
getactor[THISACTOR].x vaca_x
getactor[THISACTOR].y vaca_y
 
subvarvar x2 x
subvarvar y2 y
getangle y x2 y2 // calculates the angle to face the player
subvarvar vaca_x2 vaca_x
subvarvar vaca_y2 vaca_y
getangle vaca_y vaca_x2 vaca_y2 // calculates the angle to face the player
 
setactor[THISACTOR].htang y
setactor[THISACTOR].htang vaca_y
}
ifvare temp 26
ifvare vaca_temp 26
{
setvar temp 0
getactor[THISACTOR].x x
subvar x 1536
setactor[THISACTOR].x x
setvar vaca_temp 0
getactor[THISACTOR].x vaca_x
subvar vaca_x 1536
setactor[THISACTOR].x vaca_x
sizeat 42 50
state random_wall_jibs
sound BALLEXPLODE