Danukem, on 03 July 2022 - 03:26 PM, said:
Thanks Dan - that works great!
@Mark - thanks for the suggestions, I'd considered using invisible sprite shields too!
Danukem, on 03 July 2022 - 03:26 PM, said:
dandouglas, on 05 July 2022 - 12:09 PM, said:
Danukem, on 05 July 2022 - 02:48 PM, said:
jimbob, on 07 July 2022 - 08:01 AM, said:
This post has been edited by jimbob: 08 July 2022 - 07:27 AM
jimbob, on 08 July 2022 - 07:19 AM, said:
onevent EVENT_DRAWWEAPON ifvare currentweapon 1 { setvar RETURN -1 ifvare LUGERSELECTED 1 { state luger_display } else { state draw_pistol } } ifvare currentweapon 2 { setvar RETURN -1 state mp40_display } ifvare currentweapon 3 { setvar RETURN -1 state thompson_display } ifvare currentweapon 4 { setvar RETURN -1 state bazooka_display } ifvare currentweapon 6 { setvar RETURN -1 state flamethrower_display ifsound FTFIRE { stopactorsound APLAYER FTIDLE } else soundonce FTIDLE } ifvare currentweapon 7 { setvar RETURN -1 state MG42_display } ife currentweapon 8 // ifvare currentweapon 8 { setvar RETURN -1 state k98_display } ifvare currentweapon 9 { setvar RETURN -1 state garand_display } ifvare currentweapon 11 { setvar RETURN -1 state greaser_display } endevent
This post has been edited by jimbob: 09 July 2022 - 03:11 PM
This post has been edited by jimbob: 10 July 2022 - 04:36 PM
state flamethrower_display switch weaponcount case 0 ifinwater nullop else { setvar digz 32768 setvar digx 175 // was 150 setvar digy 200 setvar shade -127 setvar picnum 3864 // flame! // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal 1 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 250 setvar picnum 3863 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break // fire case 1 case 2 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5552 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 3 case 4 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5553 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 5 case 6 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5554 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 7 case 8 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5555 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 9 case 10 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5556 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 11 case 12 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5557 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim case 13 case 14 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5558 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 15 case 16 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5559 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 17 case 18 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5560 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 19 case 20 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5561 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break case 21 case 22 ifinwater nullop else { setvar digz 32768 setvar digx 170 setvar digy 215 setvar shade -127 setvar picnum 5562 // flame // setvar orientation 33 state initweapondisplay rotatesprite digx digy digz -192 picnum shade pal orientation 0 0 xdim ydim } // break setvar digz 32768 setvar digx 240 setvar digy 260 setvar picnum 3868 setvar orientation 0 state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break endswitch ends // end flamethrower
This post has been edited by jimbob: 11 July 2022 - 08:27 AM
jimbob, on 11 July 2022 - 06:59 AM, said:
dandouglas, on 15 July 2022 - 11:51 PM, said:
gamevar poison 0 2
ifwasweapon EGGPROJ add poison 150Again, that goes *inside* the ifhitweapon code block.
defstate newmoncode ifg poison 0 { sub poison 1 ifrnd 64 ife sprite[].htextra -1 { seta[].htextra 1 seta[].htowner player[].i seta[].htpicnum KNEE // spawn some custom actor here that looks like puke or poison smoke or something } } ends
onevent EVENT_LOOKDOWN setvar RETURN -1 ife player[].curr_weapon 8 // sniper rifle { ife USESCOPE 1 { setvar USESCOPE 0 addlogvar USESCOPE break } ife USESCOPE 0 { setvar USESCOPE 1 addlogvar USESCOPE break } } endevent
This post has been edited by jimbob: 17 July 2022 - 12:53 PM
This post has been edited by VGames: 18 July 2022 - 07:55 AM
onevent EVENT_EGS ifactor YOURACTOR { geta[].z z, sub z 5120, randvar TEMP2 64 subvarvar z TEMP2 seta[].z z } endevent
This post has been edited by jimbob: 18 July 2022 - 07:54 AM
ifactor MYACTOR { // Calculate horizontal spread getactor[THISACTOR].ang TEMP addvar TEMP 16 randvar TEMP2 32 subvarvar TEMP TEMP2 setactor[THISACTOR].ang TEMP // Calculate vertical spread getactor[THISACTOR].zvel TEMP addvar TEMP 256 randvar TEMP2 512 subvarvar TEMP TEMP2 setactor[THISACTOR].zvel TEMP }