TX, on Aug 13 2010, 01:36 AM, said:
But then the player would still be holding the keycard after the door opens.
TX, on Aug 13 2010, 01:36 AM, said:
DeeperThought, on Aug 13 2010, 04:57 PM, said:
This post has been edited by Chip: 13 August 2010 - 09:16 AM
Chip, on Aug 13 2010, 10:01 AM, said:
MIKE SIMS, on Aug 13 2010, 01:49 PM, said:
This post has been edited by Chip: 14 August 2010 - 05:58 AM
This post has been edited by MIKE SIMS: 15 August 2010 - 02:09 PM
Awesomebob, on Aug 16 2010, 02:14 PM, said:
ifspritepal 10 { espawn ACCESSCARD
setactor[RETURN].pal 23 }
darkcaleb, on Aug 24 2010, 12:10 PM, said:
DeeperThought, on Aug 24 2010, 11:15 AM, said:
This post has been edited by Awesomebob: 24 August 2010 - 02:46 PM
state finishraildamage
getactor[THISACTOR].owner owner //hitsprite
ifvarn owner -1
{
ifvarvarn owner hitsprite // making sure enemy doesn't hit itself
{
getactor[hitsprite].htextra DMG
addvarvar DMG randomvar4
ifvare picnum UFORSAKEN { divvar DMG 4 mulvar DMG 3 } ifvare picnum ZOMBIER { setvar DMG -1 setvar htflag 1405 }
ifvare picnum APLAYER { getplayer[THISACTOR].i ID ifvarvare ID owner { setvar DMG -1 setvar htflag 1405 } }
setactor[hitsprite].htextra DMG
ifactor FUSTRAIL ifvarg DMG -1 { getactor[hitsprite].extra DMG ifvarg DMG 0 sound LASGUNHIT }
setactor[hitsprite].htpicnum htflag
setvar returnvar1 1
}
}
ends
state railhurtcode
ifvarn returnvar1 1
{
getactor[THISACTOR].x x
getactor[THISACTOR].y y
getactor[THISACTOR].sectnum TEMP
getactor[THISACTOR].ang TEMPT
sin my TEMPT
cos mx TEMPT
getactor[THISACTOR].z z
getplayervar[THISACTOR].power_up POWERUPMODE
hitscan x y z TEMP mx my 0 hitsect hitwall hitsprite hitx hity hitz CLIPMASK1
ifvarn hitsprite -1
{
getactor[hitsprite].picnum picnum
switch picnum
case LIZTROOP
case CDEMON
case DEVIL
case REVENANT
case DEMON
case CHAINGUNNER
case CHAINGUNNER2
case ZOMBIEPLS
case DOUBLEGUNNER
case TANK
case BOSS1
case BOSS2
case PAINE
case LSOUL
case ENLISTEE
case BLOODSEEKER
case ZCAPTAIN
case SHADE
case IONIMP
case UFORSAKEN
case EXTERMINATOR
case ROBOTGUARD
case CACODEMON
case SHOTGUNZOMBIE
case SENTINEL
case FSPIDER
case APLAYER
case HEAVYTROOPER
case SHADOWSHIELD
case ZOMBIER
case BEAST
case SOULCUBE
case BIGIMP
case BRUISERDEMON
getactorvar[hitsprite].hitbysrail temp3
ifvare temp3 1 nullop else
{
ifactor RIPPERTRAIL
{
setvar randomvar4 0
randvarvar randomvar4 returnvar2 // RANDOM DAMAGE
mulvarvar randomvar4 returnvar3 // MULTIPLIER
ifvare randomvar4 0 setvarvar randomvar4 returnvar4 // MIN DAMAGE
ifvarand POWERUPMODE 16 mulvar randomvar4 2
setvar htflag SHOTGUNRIPPER
state finishraildamage
getactor[hitsprite].x mx
getactor[hitsprite].y my
getactor[hitsprite].z mz
subvar mz 4096
espawn JIBS6
setactor[RETURN].x mx
setactor[RETURN].y my
setactor[RETURN].z mz
setactorvar[hitsprite].hitbysrail 1 // There needs to be a variable for all types of rails, because then all trails would deal damage and it would be immense.
}
}
break
endswitch
}
}
ends
state resetrailstate // Reset the rail stuff as fast as possible
getactorvar[THISACTOR].hitbysrail railtemp
ifvare railtemp 1
{
addvar railcount2 1
ifvarg railcount2 0
{
setvar railcount2 0
setactorvar[THISACTOR].hitbysrail 0
}
}
ends
defineprojectile SHOTGUNRIPPER PROJ_WORKSLIKE 1
defineprojectile SHOTGUNRIPPER PROJ_SOUND -1
defineprojectile SHOTGUNRIPPER PROJ_EXTRA 12
defineprojectile SHOTGUNRIPPER PROJ_TRAIL RIPPERTRAIL
defineprojectile SHOTGUNRIPPER PROJ_TXREPEAT 45
defineprojectile SHOTGUNRIPPER PROJ_TYREPEAT 45
defineprojectile SHOTGUNRIPPER PROJ_TNUM 900
// defineprojectile SHOTGUNRIPPER PROJ_DECAL -1
defineprojectile SHOTGUNRIPPER PROJ_OFFSET 14354
useractor notenemy RIPPERTRAIL TOUGH
cstat 32768
ifvarn countvar 1
{
setvar returnvar2 28
setvar returnvar3 8
setvar returnvar4 16
state railhurtcode
setvar countvar 1
}
else
killit
enda
This post has been edited by XThX2: 25 December 2010 - 09:37 AM
XThX2, on Dec 25 2010, 09:37 AM, said:
gamevar PISTOLAMMO 0 1
gamevar KICKBACK 0 1
gamevar PWEAPON 0 1
gamevar PISTOLMAGAZINE 0 1
gamevar PERPLAYER1 0 1
gamevar WEAPON1_CLIP 0 0 // this last gamevar disable's the game's automatic reloading
actor APLAYER MAXPLAYERHEALTH PSTAND 0 0
getplayer[THISACTOR].curr_weapon PWEAPON // the player's current weapon
getplayer[THISACTOR].kickback_pic KICKBACK // the frame of animation the player's weapon is at
getplayer[THISACTOR].ammo_amount 1 PISTOLAMMO // the player's pistol ammo
ifvare PWEAPON 1 { // if the player has the pistol selected...
ifvarl PISTOLMAGAZINE 1 { // and his magazine count is at zero...
getplayer[THISACTOR].weapon_pos PERPLAYER1 ifvarn PERPLAYER1 0 break // if he has a weapon that's lowering off screen, break
else { ifvarl PISTOLAMMO 1 break else setplayer[THISACTOR].reloading 1 setplayer[THISACTOR].kickback_pic 4 } } // otherwise, if he has ammo for the pistol, start the reloading anim
ifvare KICKBACK 5 { // if the reloading animation is on its second frame...
ifvarg PISTOLAMMO 11 { setvar PISTOLMAGAZINE 12 } // if the player has at least twelve pistol rounds left, then set his magazine counter to a full magazine
else setvarvar PISTOLMAGAZINE PISTOLAMMO } } // otherwise set the magazine counter equal to his remaining ammo
onevent EVENT_DOFIRE
ifvare PWEAPON 1 { // if the player has the pistol selected when he fires a projectile...
ifvarl PISTOLMAGAZINE 1 break else { subvar PISTOLMAGAZINE 1 } } // subtract 1 from the magazine count, unless it's already at zero
endevent
definegamefuncname 36 RELOAD // rename it, so it'll appear as RELOAD in the control settings menu
onevent EVENT_TURNAROUND
setvar RETURN -1 // disable the event
ifvare PWEAPON 1 { // if the player has the pistol armed
ifvare PISTOLMAGAZINE 12 break // and his magazine is full, break
else ifvarvare PISTOLMAGAZINE PISTOLAMMO break // if his magazine is equal to his pistol ammo, break
else setplayer[THISACTOR].reloading 1 setplayer[THISACTOR].kickback_pic 4 } // otherwise, start the reloading sequence
endevent
onevent EVENT_RESETPLAYER
setvar PISTOLMAGAZINE 0 // if the player was reset to his starting position (i.e, he died), reset the clip amount to zero.
ifvare PWEAPON 1 { // if he has the pistol selected when he loads into the map...
setplayer[THISACTOR].reloading 1
setplayer[THISACTOR].kickback_pic 4 } // start the reloading sequence.
endevent
onevent EVENT_PRESSEDFIRE //when the player presses the fire button...
ifvare PWEAPON 1 { // and he has the pistol armed...
ifvarl PISTOLMAGAZINE 1 { setvar RETURN -1 } } // if his magazine is at zero, disable the firing key
endevent
onevent EVENT_DISPLAYREST
digitalnumberz 2930 280 175 PISTOLMAGAZINE 0 0 0 0 0 xdim ydim 50000 // display the magazine count at a slightly smaller size (50000) next to the ammo
endevent
This post has been edited by EmericaSkater: 26 February 2011 - 09:57 AM
DeeperThought, on Aug 24 2010, 01:15 PM, said:
This post has been edited by EmericaSkater: 01 March 2011 - 03:28 AM
getplayer[THISACTOR].curr_weapon PWEAPON
getplayer[THISACTOR].kickback_pic KICKBACK
getplayer[THISACTOR].ammo_amount 1 PISTOLAMMO
ifvare PWEAPON 1
{
ifvarl PISTOLMAGAZINE 1
{
getplayer[THISACTOR].weapon_pos PERPLAYER1
ifvarn PERPLAYER1 0 break
else ifvarl PISTOLAMMO 1
break
else
{
setplayer[THISACTOR].reloading 1
setplayer[THISACTOR].kickback_pic 4
} }
ifvare KICKBACK 5
{
ifvarg PISTOLAMMO 11
setvar PISTOLMAGAZINE 12
else
setvarvar PISTOLMAGAZINE PISTOLAMMO
}
}
getplayer[THISACTOR].curr_weapon PWEAPON
getplayer[THISACTOR].kickback_pic KICKBACK
getplayer[THISACTOR].ammo_amount 1 PISTOLAMMO
ifvare PWEAPON 1
{
ifvarl PISTOLMAGAZINE 1
{
getplayer[THISACTOR].weapon_pos PERPLAYER1
ifvarn PERPLAYER1 0
break
else ifvarl PISTOLAMMO 1
break
else
{
setplayer[THISACTOR].reloading 1
setplayer[THISACTOR].kickback_pic 4
}
ifvare KICKBACK 5
{
ifvarg PISTOLAMMO 11
setvar PISTOLMAGAZINE 12
else
setvarvar PISTOLMAGAZINE PISTOLAMMO
}
}
} // this last bracket here is what did it. This belongs further up, beneath the code that sets the kickback pic to 4. With the code like this, the clip ONLY gets refreshed if the magazine count is less than zero.
This post has been edited by EmericaSkater: 01 March 2011 - 05:11 AM