action AENEMYDEAD 0 state deadsprite action AENEMYDEAD cstator 256 ifhitweapon break ends state corpsehit ifhitweapon { guts JIBS6 6 ifwasweapon RADIUSEXPLOSION { state standard_jibs ifactor LIZTROOPDSPRITE state troop_body_jibs sound SQUISHED killit } ifwasweapon RPG { state standard_jibs ifactor LIZTROOPDSPRITE state troop_body_jibs sound SQUISHED killit } ifdead { state standard_jibs ifactor LIZTROOPDSPRITE state troop_body_jibs sound SQUISHED killit } } ends // // // TROOP/LIZTROOP CODE // // action ATROOPSTAND 0 1 5 1 1 action ATROOPGROW 0 1 5 1 1 action ATROOPSTAYSTAND -2 1 5 1 1 action ATROOPWALKING 0 4 5 1 12 action ATROOPWALKINGBACK 15 4 5 -1 12 action ATROOPRUNNING 0 4 5 1 8 action ATROOPSHOOT 35 1 5 1 30 action ATROOPJETPACK 40 1 5 1 1 action ATROOPJETPACKILL 40 2 5 1 50 action ATROOPFLINTCH 50 1 1 1 6 action ATROOPDYING 50 5 1 1 16 action ATROOPPLAYDEAD 0 action ATROOPSUFFERDEAD 58 2 1 -4 24 action ATROOPSUFFERING 59 2 1 1 21 action ATROOPDUCK 64 1 5 1 3 action ATROOPDUCKSHOOT 64 2 5 1 25 action ATROOPABOUTHIDE 74 1 1 1 25 action ATROOPHIDE 79 1 1 1 25 action ATROOPREAPPEAR 74 1 1 1 25 action ATROOPFROZEN 0 1 5 move TROOPWALKVELS 72 move TROOPWALKVELSBACK -72 move TROOPJETPACKVELS 64 -84 move TROOPJETPACKILLVELS 192 -38 move TROOPRUNVELS 108 move TROOPSTOPPED move DONTGETUP move SHRUNKVELS 32 ai AITROOPSEEKENEMY ATROOPWALKING TROOPWALKVELS seekplayer ai AITROOPSEEKPLAYER ATROOPWALKING TROOPWALKVELS seekplayer ai AITROOPFLEEING ATROOPWALKING TROOPWALKVELS fleeenemy ai AITROOPFLEEINGBACK ATROOPWALKINGBACK TROOPWALKVELSBACK faceplayer ai AITROOPDODGE ATROOPWALKING TROOPRUNVELS dodgebullet ai AITROOPSHOOTING ATROOPSHOOT TROOPSTOPPED faceplayer ai AITROOPDUCKING ATROOPDUCK TROOPSTOPPED faceplayer ai AITROOPJETPACK ATROOPJETPACK TROOPJETPACKVELS seekplayer ai AITROOPSHRUNK ATROOPWALKING SHRUNKVELS fleeenemy ai AITROOPHIDE ATROOPABOUTHIDE TROOPSTOPPED faceplayer ai AITROOPGROW ATROOPGROW DONTGETUP faceplayerslow ai AITROOPFADE ATROOPGROW DONTGETUP faceplayerslow state troophidestate ifaction ATROOPREAPPEAR { ifactioncount 2 { sound TELEPORTER ai AITROOPSHOOTING cstat 257 } else { sizeto 41 40 sizeto 41 40 sizeto 41 40 sizeto 41 40 spawn FRAMEEFFECT1 } } else ifaction ATROOPWALKING { ifpdistl 2448 ifpdistg 1024 { ifceilingdistl 48 break ifp pfacing break ifgapzl 64 nullop else ifawayfromwall { spawn TRANSPORTERSTAR action ATROOPREAPPEAR move 0 break } } } else ifaction ATROOPHIDE { ifactioncount 2 { spawn TRANSPORTERSTAR sound TELEPORTER action ATROOPWALKING move TROOPWALKVELS faceplayer cstat 32768 } else { sizeto 4 40 sizeto 4 40 sizeto 4 40 sizeto 4 40 spawn FRAMEEFFECT1 } } else ifaction ATROOPABOUTHIDE ifactioncount 2 { action ATROOPHIDE cstat 0 } ends state troopgunnashoot ifp palive { ifpdistl 1024 ai AITROOPSHOOTING else ifactornotstayput { ifactioncount 12 ifrnd 16 ifcanshoottarget { ifspritepal 21 ifrnd 4 ifpdistg 4096 ai AITROOPHIDE else { ifpdistl 1100 ai AITROOPFLEEING else { ifpdistl 4096 ifcansee ifcanshoottarget ai AITROOPSHOOTING else { move TROOPRUNVELS seekplayer action ATROOPRUNNING } } } } } else ifcount 26 ifrnd 32 ai AITROOPSHOOTING } ends state troopseekstate state troopgunnashoot ifinwater { ai AITROOPJETPACK break } ifcansee { ifmove TROOPRUNVELS ifpdistl 1596 ai AITROOPDUCKING ifp phigher { ifceilingdistl 128 nullop else ifactornotstayput ai AITROOPJETPACK break } else ifrnd 2 { ifspritepal 21 ifpdistg 1596 { ai AITROOPHIDE break } ifbulletnear { ifrnd 128 ai AITROOPDODGE else ai AITROOPDUCKING break } } } ifnotmoving { ifrnd 32 operate else ifcount 32 ifp palive ifcansee ifcanshoottarget ai AITROOPSHOOTING } ifrnd 1 { ifrnd 128 soundonce PRED_ROAM else soundonce PRED_ROAM2 } ends state troopduckstate ifaction ATROOPDUCK { ifactioncount 8 { ifp palive { ifrnd 128 action ATROOPDUCKSHOOT } else ifmove DONTGETUP break else ai AITROOPSEEKPLAYER } } else ifaction ATROOPDUCKSHOOT { ifcount 64 { ifmove DONTGETUP resetcount else { ifpdistl 1100 ai AITROOPFLEEING else ai AITROOPSEEKPLAYER } } else ifactioncount 2 { ifcanshoottarget { sound PRED_ATTACK resetactioncount shoot FIRELASER } else ai AITROOPSEEKPLAYER } } ends state troopshootstate ifactioncount 2 { ifcanshoottarget { shoot FIRELASER sound PRED_ATTACK resetactioncount ifrnd 128 ai AITROOPSEEKPLAYER ifcount 24 { ifrnd 96 ifpdistg 2048 ai AITROOPSEEKPLAYER else { ifpdistg 1596 ai AITROOPFLEEING else ai AITROOPFLEEINGBACK } } } else ai AITROOPSEEKPLAYER } ends state troopfleestate ifactioncount 7 { ifpdistg 3084 { ai AITROOPSEEKPLAYER break } else ifrnd 32 ifp palive ifcansee ifcanshoottarget { ifrnd 128 ai AITROOPDUCKING else ai AITROOPSHOOTING break } } ifnotmoving { ifrnd 32 operate else ifcount 32 ifp palive ifcansee ifcanshoottarget { ifrnd 128 ai AITROOPSHOOTING else ai AITROOPDUCKING } } ends state troopdying iffloordistl 32 { ifactioncount 5 { iffloordistl 8 sound THUD ifrnd 64 spawn BLOODPOOL state rf move TROOPSTOPPED state deadsprite strength TROOPSTRENGTH cactor LIZTROOPDSPRITE } break } else { state rf move 0 action ATROOPDYING } ends state checktroophit ifaction ATROOPSUFFERING { stopsound LIZARD_BEG sound PRED_DYING cstat 0 strength 0 action ATROOPSUFFERDEAD break } ifdead { ifwasweapon FREEZEBLAST { sound SOMETHINGFROZE spritepal 1 move 0 action ATROOPFROZEN strength 0 break } state drop_ammo state random_wall_jibs ifwasweapon GROWSPARK { cstat 0 sound ACTOR_GROWING ai AITROOPGROW break } addkills 1 ifwasweapon RPG { sound SQUISHED state troop_body_jibs state standard_jibs killit } else ifwasweapon RADIUSEXPLOSION { sound SQUISHED state troop_body_jibs state standard_jibs killit } else { sound PRED_DYING ifrnd 32 iffloordistl 32 { sound LIZARD_BEG spawn BLOODPOOL strength 0 move 0 action ATROOPSUFFERING break } action ATROOPDYING break } } else { state random_wall_jibs sound PRED_PAIN ifwasweapon SHRINKSPARK { sound ACTOR_SHRINKING ai AITROOPSHRUNK } else ifwasweapon GROWSPARK sound EXPANDERHIT else iffloordistl 32 ifrnd 96 action ATROOPFLINTCH } ends state troopjetpackstate ifaction ATROOPJETPACKILL { ifcansee ifactioncount 2 { resetactioncount sound PRED_ATTACK shoot FIRELASER } ifp phigher ai AITROOPJETPACK else ifinwater ai AITROOPJETPACK else ifcount 26 iffloordistl 32 ai AITROOPSEEKPLAYER } else ifcount 48 ifcansee { action ATROOPJETPACKILL move TROOPJETPACKILLVELS seekplayer } ends state checksquished ifsquished { addkills 1 sound SQUISHED state standard_jibs state random_ooz killit } ends state troopsufferingstate ifactioncount 2 { ifrnd 16 spawn WATERDRIP ifactioncount 14 { stopsound LIZARD_BEG cstat 0 strength 0 action ATROOPSUFFERDEAD break } } ends state troopshrunkstate ifcount SHRUNKDONECOUNT ai AITROOPSEEKENEMY else ifcount SHRUNKCOUNT sizeto 48 40 else state genericshrunkcode ends state troopcode fall ifinwater ifrnd 1 spawn WATERBUBBLE ifaction ATROOPSTAND { ifrnd 192 ai AITROOPSHOOTING else ai AITROOPSEEKPLAYER } else ifaction ATROOPFROZEN { ifcount THAWTIME { ai AITROOPSEEKENEMY getlastpal } else ifcount FROZENDRIPTIME { ifactioncount 26 { spawn WATERDRIP resetactioncount } } ifhitweapon { ifwasweapon FREEZEBLAST { strength 0 break } addkills 1 ifrnd 84 spawn BLOODPOOL lotsofglass 30 sound GLASS_BREAKING killit } ifp pfacing ifpdistl FROZENQUICKKICKDIST pkick break } else ifaction ATROOPSUFFERDEAD { ifactioncount 2 { state deadsprite ifrnd 64 { resetcount action ATROOPPLAYDEAD } else soundonce PRED_DYING strength TROOPSTRENGTH cactor LIZTROOPDSPRITE } } else ifaction ATROOPDYING { state troopdying break } else ifaction ATROOPSUFFERING { state troopsufferingstate ifhitweapon state checktroophit break } else ifaction ATROOPFLINTCH { ifactioncount 4 ai AITROOPSEEKENEMY } else { ifai AITROOPSEEKPLAYER state troopseekstate else ifai AITROOPJETPACK { state troopjetpackstate ifinwater nullop else soundonce RECO_ROAM } else ifai AITROOPSEEKENEMY state troopseekstate else ifai AITROOPSHOOTING state troopshootstate else ifai AITROOPFLEEING state troopfleestate else ifai AITROOPFLEEINGBACK state troopfleestate else ifai AITROOPDODGE state troopseekstate else ifai AITROOPDUCKING state troopduckstate else ifai AITROOPSHRUNK state troopshrunkstate else ifai AITROOPGROW state genericgrowcode else ifai AITROOPHIDE { state troophidestate break } } ifai AITROOPSHRUNK break ifhitweapon state checktroophit else state checksquished ends state checktrooppalette ifai 0 { ifspritepal 0 nullop else ifspritepal 21 addstrength TROOPSTRENGTH // Double the hitpoint vals } ends actor LIZTROOPJETPACK TROOPSTRENGTH state checktrooppalette ai AITROOPJETPACK cactor LIZTROOP enda actor LIZTROOPDUCKING TROOPSTRENGTH state checktrooppalette ai AITROOPDUCKING cactor LIZTROOP ifgapzl 48 move DONTGETUP enda actor LIZTROOPSHOOT TROOPSTRENGTH ATROOPSTAND state checktrooppalette ai AITROOPSHOOTING cactor LIZTROOP enda actor LIZTROOPSTAYPUT TROOPSTRENGTH ATROOPSTAYSTAND state checktrooppalette ai AITROOPSEEKPLAYER cactor LIZTROOP enda actor LIZTROOPRUNNING TROOPSTRENGTH ATROOPSTAND state checktrooppalette ai AITROOPSEEKPLAYER cactor LIZTROOP enda actor LIZTROOPONTOILET TROOPSTRENGTH ifcount 24 { sound FLUSH_TOILET operate ai AITROOPSEEKPLAYER cactor LIZTROOP } else ifcount 2 nullop else state checktrooppalette enda actor LIZTROOPJUSTSIT TROOPSTRENGTH ifcount 30 { operate ai AITROOPSEEKPLAYER cactor LIZTROOP } else ifcount 2 nullop else state checktrooppalette enda actor LIZTROOP TROOPSTRENGTH ATROOPSTAND state checktrooppalette state troopcode enda useractor notenemy LIZTROOPDSPRITE TROOPSTRENGTH fall move 0 state checksquished state corpsehit /* ifaction ATROOPPLAYDEAD { ifcount PLAYDEADTIME { addkills -1 soundonce PRED_ROAM cactor LIZTROOP cstat 257 strength 1 ai AITROOPSHOOTING } else ifp pfacing resetcount break } */ ifaction AENEMYDEAD ifrespawn ifcount RESPAWNACTORTIME { spawn TRANSPORTERSTAR addkills -1 cactor LIZTROOP cstat 257 strength TROOPSTRENGTH state checktrooppalette ai AITROOPSEEKENEMY } enda
Above is the code that I used from the DN64 mod, and modified for DN3D (Eduke32 and non versions) all inside the GAME.CON. Everything works with the exception that the Assault Trooper doesn't respawn for some reason. I can't figure out what I'm doing wrong.