Subversion Repositories vaca_plus

Compare Revisions

Regard whitespace Rev HEAD → Rev 1

/vaca_plus/VDragon.con
37,7 → 37,7
move DRAGONSPEED 60 0
move DRAGONFLEE 300 0
move DRAGONSTOPPED
move DRAGONBACK -500 0
move DRAGONBACK -250 0
move DRAGONSHRUNKSPEED 50 0
 
ai AIDRAGONFLEE DRAGONBOUNCE DRAGONFLEE fleeenemy randomangle
97,20 → 97,22
}
ends
 
 
state dragondeathanglecode
ifvare vaca_temp3 -1
ifvare temp3 0
{
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 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 vaca_temp3 // pass this along to EVENT_ANIMATESPRITES
 
setactor[THISACTOR].ang vaca_temp // sets the angle, just in time for movement
getplayer[THISACTOR].i temp // gets the player's ID
getactor[temp].x x2
getactor[temp].y y2
getactor[THISACTOR].x x
getactor[THISACTOR].y y // gets the coordinates of the player and dragon
subvarvar x2 x
subvarvar y2 y
getangle temp2 x2 y2 // calculates the angle to face the player
setvar temp 0
randvar temp 256 // randomizes the angle within a certain logical range, since the bullet holes are facing the player
ifrnd 128 addvarvar temp2 temp else subvarvar temp2 temp
setactor[THISACTOR].ang temp2 // sets the angle, just in time for movement
setvar temp3 1
}
ends
 
173,7 → 175,6
{
ifrnd 100
{
ifcansee nullop else ai AIDRAGONBOUNCESEE // This line should make the dragon smarter.
resetcount
resetactioncount
}
223,8 → 224,8
}
else
{
ai AIDRAGONDYING
state dragondeathanglecode
ai AIDRAGONDYING
}
 
sound BALLEXPLODE
289,14 → 290,7
useractor enemy DRAGON DRAGONSTRENGTH DRAGONBOUNCE
fall
cstator 257
setactor[THISACTOR].mdflags 16
 
ifai 0
{
setvar vaca_temp3 -1
ai AIDRAGONBOUNCE
}
 
state checksquished
 
ifaction DRAGONDEAD
308,7 → 302,6
spawn TRANSPORTERSTAR
cstat 257
strength DRAGONSTRENGTH
setvar vaca_temp3 -1
ai AIDRAGONBOUNCE
}
else
360,9 → 353,10
break
}
 
ifhitweapon
state DRAGONHITSTATE
ifhitweapon state DRAGONHITSTATE
 
ifai 0 ai AIDRAGONBOUNCE
 
ifai AIDRAGONGROW state dragongrowstate
else ifai AIDRAGONSHRUNK state DRAGONSHRINKSTATE
else
379,32 → 373,13
enda
 
useractor notenemy DRAGONDEATH 0
setvar vaca_temp3 -1
setactor[THISACTOR].mdflags 16
 
addvar vaca_temp 1
ifvare vaca_temp 1
addvar temp 1
ifvare temp 26
{
getplayer[THISACTOR].i vaca_temp2 // get the player's ID
 
// get the coordinates of the player and dragon
getactor[vaca_temp2].x vaca_x2
getactor[vaca_temp2].y vaca_y2
getactor[THISACTOR].x vaca_x
getactor[THISACTOR].y vaca_y
 
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 vaca_y
}
ifvare vaca_temp 26
{
setvar vaca_temp 0
getactor[THISACTOR].x vaca_x
subvar vaca_x 1536
setactor[THISACTOR].x vaca_x
setvar temp 0
getactor[THISACTOR].x x
subvar x 1536
setactor[THISACTOR].x x
sizeat 42 50
state random_wall_jibs
sound BALLEXPLODE