2013-01-24 20:02:57 +00:00
|
|
|
gamevar snd 351 0 // thunder sound
|
2013-02-07 21:01:12 +00:00
|
|
|
gamevar tmp 0 0
|
|
|
|
gamevar tmp2 0 0
|
2013-01-24 20:02:57 +00:00
|
|
|
gamevar shoots 2605 2 // RPG
|
|
|
|
|
|
|
|
gamevar WEAPON1_SHOOTS 2605 0
|
|
|
|
|
2013-02-07 21:01:03 +00:00
|
|
|
define MORTER2 1653
|
2015-08-08 07:04:11 +00:00
|
|
|
// NOTE: the custom MORTER2 doesn't spawn FRAMEEFFECT like the MORTER, which
|
|
|
|
// has some hard-wired code running.
|
2013-02-07 21:01:03 +00:00
|
|
|
defineprojectile MORTER2 PROJ_WORKSLIKE 6150
|
|
|
|
defineprojectile MORTER2 PROJ_SPAWNS EXPLOSION2
|
2013-02-07 21:01:12 +00:00
|
|
|
defineprojectile MORTER2 PROJ_SOUND RPG_SHOOT
|
2013-02-07 21:01:03 +00:00
|
|
|
defineprojectile MORTER2 PROJ_VEL 600
|
|
|
|
defineprojectile MORTER2 PROJ_EXTRA 165
|
|
|
|
defineprojectile MORTER2 PROJ_EXTRA_RAND 10
|
2013-02-07 21:01:12 +00:00
|
|
|
defineprojectile MORTER2 PROJ_DROP -200 // tested in test.elua
|
2013-02-07 21:01:03 +00:00
|
|
|
defineprojectile MORTER2 PROJ_ISOUND PIPEBOMB_EXPLODE
|
|
|
|
defineprojectile MORTER2 PROJ_HITRADIUS 2800
|
|
|
|
defineprojectile MORTER2 PROJ_BOUNCES 4
|
|
|
|
defineprojectile MORTER2 PROJ_OFFSET 128
|
|
|
|
defineprojectile MORTER2 PROJ_CLIPDIST 24
|
2013-02-10 16:23:59 +00:00
|
|
|
defineprojectile MORTER2 PROJ_TRAIL -1 // overridden in test.elua
|
2013-02-07 21:01:03 +00:00
|
|
|
defineprojectile MORTER2 PROJ_TNUM 6
|
2013-06-09 16:37:18 +00:00
|
|
|
defineprojectile MORTER2 PROJ_USERDATA 32 // test setting initial value
|
2013-02-07 21:01:03 +00:00
|
|
|
|
2013-01-24 20:02:57 +00:00
|
|
|
onevent EVENT_GAME
|
|
|
|
setvarvar WEAPON1_FIRESOUND snd
|
|
|
|
// setvarvar WEAPON1_SHOOTS shoots
|
|
|
|
endevent
|
2013-02-07 21:01:12 +00:00
|
|
|
|
2013-06-09 16:37:18 +00:00
|
|
|
definequote 400 Failed setting projectile userdata
|
|
|
|
|
2013-02-07 21:01:12 +00:00
|
|
|
useractor notenemy 909 // tree trunk
|
|
|
|
ifcount 120
|
|
|
|
{
|
2015-08-08 07:04:11 +00:00
|
|
|
zshoot -4096 BOUNCEMINE
|
|
|
|
|
2013-06-09 16:37:18 +00:00
|
|
|
// userdata: bitwise-OR in 64
|
|
|
|
getprojectile[MORTER2].userdata tmp
|
|
|
|
orvar tmp 64
|
|
|
|
setprojectile[MORTER2].userdata tmp
|
|
|
|
|
2013-02-07 21:01:12 +00:00
|
|
|
ezshoot -4096 MORTER2
|
|
|
|
getthisprojectile[RETURN].vel tmp
|
|
|
|
randvar tmp2 500
|
|
|
|
subvarvar tmp tmp2
|
|
|
|
setthisprojectile[RETURN].vel tmp
|
|
|
|
resetcount
|
2013-06-09 16:37:18 +00:00
|
|
|
|
|
|
|
// userdata: must be 32+64 now
|
|
|
|
getthisprojectile[RETURN].userdata tmp
|
|
|
|
ifvarn tmp 96
|
|
|
|
quote 400
|
2013-02-07 21:01:12 +00:00
|
|
|
}
|
|
|
|
enda
|
2013-07-13 21:04:38 +00:00
|
|
|
|
|
|
|
onevent EVENT_JUMP
|
|
|
|
tossweapon
|
|
|
|
endevent
|