Mikko Pekkola, on 08 February 2013 - 11:49 AM, said:
Ok good luck man.
Mikko Pekkola, on 08 February 2013 - 09:40 AM, said:
ifp phigher ifcansee [test various distances like ifpdistl 1500 ifpdistg 3000 ] { action AMyTrooperShootUp .... and whatever shooting sequence ifp pjetpack { give the actor some nasty shooting abilities } }
Mikko Pekkola, on 08 February 2013 - 11:49 AM, said:
This post has been edited by Hank: 08 February 2013 - 07:36 PM
Mikko Pekkola, on 08 February 2013 - 05:46 AM, said:
This post has been edited by Mikko Pekkola: 09 February 2013 - 08:48 AM
Mikko Pekkola, on 09 February 2013 - 07:10 AM, said:
This post has been edited by Mikko Pekkola: 09 February 2013 - 10:57 AM
Mikko Pekkola, on 09 February 2013 - 10:29 AM, said:
This post has been edited by Hank: 09 February 2013 - 11:12 AM
Hank, on 09 February 2013 - 11:11 AM, said:
// MYTROOP CODE // // action AMYTROOPSTAND 30 1 5 1 1 action AMYTROOPWALKING 0 6 5 1 8 action AMYTROOPWALKINGBACK 25 6 5 -1 8 action AMYTROOPRUNNING 0 6 5 1 4 action AMYTROOPSHOOT 30 2 5 1 30 action AMYTROOPGROW 0 1 5 1 1 action AMYTROOPJETPACK 50 1 5 1 1 action AMYTROOPDYING 70 5 1 1 16 action AMYTROOPDEAD 74 action AMYTROOPFROZEN 0 1 5 move MYTROOPWALKVELS 72 move MYTROOPWALKVELSBACK -72 move MYTROOPJETPACKVELS 64 -84 move MYTROOPJETPACKILLVELS 192 -38 move MYTROOPRUNVELS 108 move MYTROOPSTOPPED ai AIMYTROOPSEEKENEMY AMYTROOPWALKING MYTROOPWALKVELS seekplayer ai AIMYTROOPSEEKPLAYER AMYTROOPWALKING MYTROOPWALKVELS seekplayer ai AIMYTROOPFLEEING AMYTROOPWALKING MYTROOPWALKVELS fleeenemy ai AIMYTROOPFLEEINGBACK AMYTROOPWALKINGBACK MYTROOPWALKVELSBACK faceplayersmart ai AIMYTROOPDODGE AMYTROOPWALKING MYTROOPRUNVELS dodgebullet ai AIMYTROOPSHOOTING AMYTROOPSHOOT MYTROOPSTOPPED faceplayersmart ai AIMYTROOPJETPACK AMYTROOPJETPACK MYTROOPJETPACKVELS seekplayer ai AIMYTROOPSHRUNK AMYTROOPWALKING SHRUNKVELS fleeenemy ai AIMYTROOPGROW AMYTROOPGROW DONTGETUP faceplayerslow state mytroopgunnashoot ifp palive { ifpdistl 1024 ai AIMYTROOPSHOOTING else ifactornotstayput { ifactioncount 12 ifrnd 16 ifcanshoottarget { { ifpdistl 1100 ai AIMYTROOPFLEEING else { ifpdistl 4096 ifcansee ifcanshoottarget ai AIMYTROOPSHOOTING else { move MYTROOPRUNVELS seekplayer action AMYTROOPRUNNING } } } } } else ifcount 26 ifrnd 32 ai AIMYTROOPSHOOTING } ends state mytroopseekstate state mytroopgunnashoot ifinwater { ai AIMYTROOPJETPACK break } ifcansee ifp phigher { ifceilingdistl 128 nullop else ifactornotstayput ai AIMYTROOPJETPACK break } ifnotmoving { ifrnd 32 operate else ifcount 32 ifp palive ifcansee ifcanshoottarget ai AIMYTROOPSHOOTING } ifrnd 1 { ifrnd 128 soundonce PRED_ROAM else soundonce PRED_ROAM2 } ends state mytroopstate ifactioncount 2 { ifcanshoottarget { shoot SHOTSPARK1 { ifpdistg 2000 { ifspritepal 10 shoot SHOTSPARK1 } else shoot SHOTSPARK1 } { } resetactioncount ifrnd 128 ai AIMYTROOPSEEKPLAYER ifcount 24 { ifrnd 96 ifpdistg 2048 ai AIMYTROOPSEEKPLAYER else { ifpdistg 1596 ai AIMYTROOPFLEEING else ai AIMYTROOPFLEEINGBACK } } } else ai AIMYTROOPSEEKPLAYER } ends state mytroopfleestate ifactioncount 7 { ifpdistg 3084 { ai AIMYTROOPSEEKPLAYER break } else ifrnd 32 ifp palive ifcansee ifcanshoottarget { ai AIMYTROOPSHOOTING break } } ifnotmoving { ifrnd 32 operate else ifcount 32 ifp palive ifcansee ifcanshoottarget { ai AIMYTROOPSHOOTING } } ends state mytroopdying iffloordistl 32 { ifactioncount 5 { cstat 0 iffloordistl 8 sound THUD state rf strength 0 move MYTROOPSTOPPED action AMYTROOPDEAD } break } else { state rf move 0 action AMYTROOPDYING } break } else { state rf move 0 action AMYTROOPDYING } ends state checkedfhit ifdead { ifwasweapon FREEZEBLAST { sound SOMETHINGFROZE spritepal 1 move 0 action AMYTROOPFROZEN strength 0 break } state drop_ammo state random_wall_jibs ifwasweapon GROWSPARK { cstat 0 sound ACTOR_GROWING ai AIMYTROOPGROW 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 strength 0 move 0 break } action AMYTROOPDYING break } } else { state random_wall_jibs sound PRED_PAIN ifwasweapon SHRINKSPARK { sound ACTOR_SHRINKING ai AIMYTROOPSHRUNK } else iffloordistl 32 ifrnd 96 action AMYTROOPFLINTCH } ends state mytroopjetpackstate ifaction AMYTROOPJETPACKILL { ifcansee ifactioncount 2 { resetactioncount shoot SHOTSPARK1 } ifp phigher ai AIMYTROOPJETPACK else ifinwater ai AIMYTROOPJETPACK else ifcount 26 iffloordistl 32 ai AIMYTROOPSEEKPLAYER } else ifcount 48 ifcansee { action AMYTROOPJETPACKILL move MYTROOPJETPACKILLVELS seekplayer } ends state mytroopshrunkstate ifcount SHRUNKDONECOUNT ai AIMYTROOPSEEKENEMY else ifcount SHRUNKCOUNT sizeto 48 40 else state genericshrunkcode ends state mytroopcodefall ifinwater ifrnd 1 spawn WATERBUBBLE ifaction AMYTROOPSTAND { ifrnd 192 ai AIMYTROOPSHOOTING else ai AIMYTROOPSEEKPLAYER } else ifaction AMYTROOPFROZEN { ifcount THAWTIME { ai AIMYTROOPSEEKENEMY getlastpal } else ifcount FROZENDRIPTIME { ifactioncount 26 { spawn WATERDRIP resetactioncount } } ifhitweapon { ifwasweapon FREEZEBLAST { strength 0 break } addkills 1 lotsofglass 30 sound GLASS_BREAKING killit } ifp pfacing ifpdistl FROZENQUICKKICKDIST pkick break ifhitweapon { ifwasweapon RADIUSEXPLOSION { sound SQUISHED state troop_body_jibs state standard_jibs killit } break } else state checksquished else ifp pfacing resetcount break } else ifaction AMYTROOPDEAD { strength 0 ifrespawn ifcount RESPAWNACTORTIME { spawn TRANSPORTERSTAR cstat 257 strength MYTROOPSTRENGHT ai AIMYTROOPSEEKENEMY } ifhitweapon { ifwasweapon RADIUSEXPLOSION { sound SQUISHED state troop_body_jibs state standard_jibs killit } break } else state checksquished break ifactioncount 2 { ifrnd 64 { soundonce PRED_DYING action AMYTROOPDEAD } } } else ifaction AMYTROOPDYING { state mytroopdying break ifhitweapon state checkedfhit break } else ifaction AMYTROOPFLINTCH { ifactioncount 4 ai AIMYTROOPSEEKENEMY } else { ifai AIMYTROOPSEEKPLAYER state mytroopseekstate else ifai AIMYTROOPJETPACK { state mytroopjetpackstate ifinwater nullop else soundonce DUKE_JETPACK_IDLE } else ifai AIMYTROOPSEEKENEMY state mytroopseekstate else ifai AIMYTROOPSHOOTING state mytroopshootstate else ifai AIMYTROOPFLEEING state mytroopfleestate else ifai AIMYTROOPFLEEINGBACK state mytroopfleestate else ifai AIMYTROOPDODGE state mytroopseekstate else ifai AIMYTROOPSHRUNK state mytroopshrunkstate } ifhitweapon state checkedfhit else state checksquished ends state checkedfpalette ifai 0 { ifspritepal 0 nullop else ifspritepal 21 addstrength MYTROOPSTRENGHT // Double the hitpoint vals } ends useractor enemy MYTROOPJETPACK MYTROOPSTRENGHT state checkedfpalette ai AIMYTROOPJETPACK cactor MYTROOP enda useractor enemy MYTROOPSHOOT MYTROOPSTRENGHT AMYTROOPSTAND state checkedfpalette ai AIMYTROOPSHOOTING cactor MYTROOP enda useractor enemy MYTROOPSTAYPUT MYTROOPSTRENGHT AMYTROOPSTAYSTAND state checkedfpalette ai AIMYTROOPSEEKPLAYER cactor MYTROOP enda useractor enemy MYTROOPRUNNING MYTROOPSTRENGHT AMYTROOPSTAND state checkedfpalette ai AIMYTROOPSEEKPLAYER cactor MYTROOP enda useractor enemy MYTROOP MYTROOPSTRENGHT AMYTROOPSTAND sizeat 40 40 state checkedfpalette state mytroopcode enda
This post has been edited by Mikko Pekkola: 09 February 2013 - 12:57 PM
Mikko_Sandt, on 09 February 2013 - 01:06 PM, said:
This post has been edited by Mikko Pekkola: 10 February 2013 - 01:03 AM
Mikko_Sandt, on 10 February 2013 - 05:17 AM, said:
state mytroopstate ifactioncount 2 { ifcanshoottarget { shoot SHOTSPARK1 { ifpdistg 2000 { ifspritepal 10 shoot SHOTSPARK1 } else shoot SHOTSPARK1 } { } resetactioncount ifrnd 128 ai AIMYTROOPSEEKPLAYER ifcount 24 { ifrnd 96 ifpdistg 2048 ai AIMYTROOPSEEKPLAYER else { ifpdistg 1596 ai AIMYTROOPFLEEING else ai AIMYTROOPFLEEINGBACK } } } else ai AIMYTROOPSEEKPLAYER } ends state mytroopfleestate ifactioncount 7 { ifpdistg 3084 { ai AIMYTROOPSEEKPLAYER break } else ifrnd 32 ifp palive ifcansee ifcanshoottarget { ai AIMYTROOPSHOOTING break } } ifnotmoving { ifrnd 32 operate else ifcount 32 ifp palive ifcansee ifcanshoottarget { ai AIMYTROOPSHOOTING } } ends state mytroopdying iffloordistl 32 { ifactioncount 5 { cstat 0 iffloordistl 8 sound THUD state rf strength 0 move MYTROOPSTOPPED action AMYTROOPDEAD } break } else { state rf move 0 action AMYTROOPDYING } break { else { state rf move 0 action AMYTROOPDYING } ends state checkedfhit ifdead { ifwasweapon FREEZEBLAST { sound SOMETHINGFROZE spritepal 1 move 0 action AMYTROOPFROZEN strength 0 break } state drop_ammo state random_wall_jibs ifwasweapon GROWSPARK { cstat 0 sound ACTOR_GROWING ai AIMYTROOPGROW 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 strength 0 move 0 break } action AMYTROOPDYING break } } else { state random_wall_jibs sound PRED_PAIN ifwasweapon SHRINKSPARK { sound ACTOR_SHRINKING ai AIMYTROOPSHRUNK } else iffloordistl 32 ifrnd 96 action AMYTROOPFLINTCH } ends state mytroopjetpackstate ifaction AMYTROOPJETPACKILL { ifcansee ifactioncount 2 { resetactioncount shoot SHOTSPARK1 } ifp phigher ai AIMYTROOPJETPACK else ifinwater ai AIMYTROOPJETPACK else ifcount 26 iffloordistl 32 ai AIMYTROOPSEEKPLAYER } else ifcount 48 ifcansee { action AMYTROOPJETPACKILL move MYTROOPJETPACKILLVELS seekplayer } ends state mytroopshrunkstate ifcount SHRUNKDONECOUNT ai AIMYTROOPSEEKENEMY else ifcount SHRUNKCOUNT sizeto 48 40 else state genericshrunkcode ends state mytroopcodefall ifinwater ifrnd 1 spawn WATERBUBBLE ifaction AMYTROOPSTAND { ifrnd 192 ai AIMYTROOPSHOOTING else ai AIMYTROOPSEEKPLAYER } else ifaction AMYTROOPFROZEN { ifcount THAWTIME { ai AIMYTROOPSEEKENEMY getlastpal } else ifcount FROZENDRIPTIME { ifactioncount 26 { spawn WATERDRIP resetactioncount } } ifhitweapon { ifwasweapon FREEZEBLAST { strength 0 break } addkills 1 lotsofglass 30 sound GLASS_BREAKING killit } ifp pfacing ifpdistl FROZENQUICKKICKDIST pkick break ifhitweapon { ifwasweapon RADIUSEXPLOSION { sound SQUISHED state troop_body_jibs state standard_jibs killit } break } else state checksquished else ifp pfacing resetcount break } else ifaction AMYTROOPDEAD { strength 0 ifrespawn ifcount RESPAWNACTORTIME { spawn TRANSPORTERSTAR cstat 257 strength MYTROOPSTRENGHT ai AIMYTROOPSEEKENEMY } ifhitweapon { ifwasweapon RADIUSEXPLOSION { sound SQUISHED state troop_body_jibs state standard_jibs killit } break } else state checksquished break ifactioncount 2 { ifrnd 64 { soundonce PRED_DYING action AMYTROOPDEAD } } } else ifaction AMYTROOPDYING { state mytroopdying break ifhitweapon state checkedfhit break { else ifaction AMYTROOPFLINTCH { ifactioncount 4 ai AIMYTROOPSEEKENEMY } else { ifai AIMYTROOPSEEKPLAYER state mytroopseekstate else ifai AIMYTROOPJETPACK { state mytroopjetpackstate ifinwater nullop else soundonce DUKE_JETPACK_IDLE } else ifai AIMYTROOPSEEKENEMY state mytroopseekstate else ifai AIMYTROOPSHOOTING state mytroopshootstate else ifai AIMYTROOPFLEEING state mytroopfleestate else ifai AIMYTROOPFLEEINGBACK state mytroopfleestate else ifai AIMYTROOPDODGE state mytroopseekstate else ifai AIMYTROOPSHRUNK state mytroopshrunkstate } ifhitweapon state checkedfhit else state checksquished ends state checkedfpalette ifai 0 { ifspritepal 0 nullop else ifspritepal 21 addstrength MYTROOPSTRENGHT // Double the hitpoint vals } ends useractor enemy MYTROOPJETPACK MYTROOPSTRENGHT state checkedfpalette ai AIMYTROOPJETPACK cactor MYTROOP enda useractor enemy MYTROOPSHOOT MYTROOPSTRENGHT AMYTROOPSTAND state checkedfpalette ai AIMYTROOPSHOOTING cactor MYTROOP enda useractor enemy MYTROOPSTAYPUT MYTROOPSTRENGHT AMYTROOPSTAYSTAND state checkedfpalette ai AIMYTROOPSEEKPLAYER cactor MYTROOP enda useractor enemy MYTROOPRUNNING MYTROOPSTRENGHT AMYTROOPSTAND state checkedfpalette ai AIMYTROOPSEEKPLAYER cactor MYTROOP enda useractor enemy MYTROOP MYTROOPSTRENGHT AMYTROOPSTAND sizeat 40 40 state checkedfpalette state mytroopcode enda
This post has been edited by Mikko Pekkola: 10 February 2013 - 05:24 AM
Mikko_Sandt, on 10 February 2013 - 05:38 AM, said:
This post has been edited by Mikko Pekkola: 10 February 2013 - 05:50 AM
Mikko Pekkola, on 10 February 2013 - 05:41 AM, said:
Hank, on 10 February 2013 - 07:43 AM, said:
This post has been edited by Mikko Pekkola: 10 February 2013 - 08:48 AM
Mikko Pekkola, on 10 February 2013 - 08:40 AM, said:
This post has been edited by Hank: 10 February 2013 - 09:23 AM
Hank, on 10 February 2013 - 08:48 AM, said:
Mikko Pekkola, on 10 February 2013 - 09:50 AM, said: