Back to the Vavoom Forum Archives


Forum

fellow marines

Wed, 07 Apr 2004 10:10:01

gunrock

I'm really into the vavoomc progs now. Okay so now i want to make a helper marine but if i make it a<br>bot wouldn't i have to add consele command<br>add bot to get it to show up in my map?<br>or is it easier just to make a good monster<br>who attacks other monsters?
Wed, 07 Apr 2004 16:39:49

Janis Legzdinsh

Probably a new monster will be easier, since bots currently are designed for deathmatch only. But if you want, you can also fix bots to work cooperatively in coop mode.
Thu, 08 Apr 2004 11:11:06

gunrock

I'm going with the good monster... so far i got it all set up but my new marine edited from a zombieman just sits there and do nothing ???  How can i get the marine<br>to attack  other monsters? Also i'm using<br>the player doom model that shows up but not the<br>doom guys gun? Here is the marine.vc:<br><br><br>class Marine:Pawn<br>       __mobjinfo__(230);<br><br><br>__states__<br>{<br>      S_P_STND('PLAY', 0, 'players/doomguy/tris.md2', 0, -1.0, S_NULL) { }<br>      S_P_RUN1('PLAY', 0, 'players/doomguy/tris.md2', 1, 4.0 / 35.0, S_PLAY_RUN2) { }<br>      S_P_RUN2('PLAY', 1, 'players/doomguy/tris.md2', 2, 4.0 / 35.0, S_PLAY_RUN3) { }<br>      S_P_RUN3('PLAY', 2, 'players/doomguy/tris.md2', 3, 4.0 / 35.0, S_PLAY_RUN4) { }<br>      S_P_RUN4('PLAY', 3, 'players/doomguy/tris.md2', 4, 4.0 / 35.0, S_PLAY_RUN1) { }<br>      S_P_ATK1('PLAY', 4, 'players/doomguy/tris.md2', 5, 12.0 / 35.0, S_PLAY) { }<br>      S_P_ATK2('PLAY', 5 | FF_FULLBRIGHT, 'players/doomguy/tris.md2', 6, 6.0 / 35.0, S_PLAY_ATK1) { }<br>      S_P_PAIN('PLAY', 6, 'players/doomguy/tris.md2', 7, 4.0 / 35.0, S_PLAY_PAIN2) { }<br>      S_P_PAIN2('PLAY', 6, 'players/doomguy/tris.md2', 8, 4.0 / 35.0, S_PLAY) { A_Pain(); }<br>      S_P_DIE1('PLAY', 7, 'players/doomguy/tris.md2', 9, 10.0 / 35.0, S_PLAY_DIE2) { }<br>      S_P_DIE2('PLAY', 8, 'players/doomguy/tris.md2', 10, 10.0 / 35.0, S_PLAY_DIE3) { A_PlayerScream(); }<br>      S_P_DIE3('PLAY', 9, 'players/doomguy/tris.md2', 11, 10.0 / 35.0, S_PLAY_DIE4) { A_Fall(); }<br>      S_P_DIE4('PLAY', 10, 'players/doomguy/tris.md2', 12, 10.0 / 35.0, S_PLAY_DIE5) { }<br>      S_P_DIE5('PLAY', 11, 'players/doomguy/tris.md2', 13, 10.0 / 35.0, S_PLAY_DIE6) { }<br>      S_P_DIE6('PLAY', 12, 'players/doomguy/tris.md2', 14, 10.0 / 35.0, S_PLAY_DIE7) { }<br>      S_P_DIE7('PLAY', 13, 'players/doomguy/tris.md2', 15, -1.0, S_NULL) { }<br>      S_P_XDIE1('PLAY', 14, 'players/doomguy/xplode.md2', 0, 5.0 / 35.0, S_PLAY_XDIE2) { }<br>      S_P_XDIE2('PLAY', 15, 'players/doomguy/xplode.md2', 1, 5.0 / 35.0, S_PLAY_XDIE3) { A_XScream(); }<br>      S_P_XDIE3('PLAY', 16, 'players/doomguy/xplode.md2', 2, 5.0 / 35.0, S_PLAY_XDIE4) { A_Fall(); }<br>      S_P_XDIE4('PLAY', 17, 'players/doomguy/xplode.md2', 3, 5.0 / 35.0, S_PLAY_XDIE5) { }<br>      S_P_XDIE5('PLAY', 18, 'players/doomguy/xplode.md2', 4, 5.0 / 35.0, S_PLAY_XDIE6) { }<br>      S_P_XDIE6('PLAY', 19, 'players/doomguy/xplode.md2', 5, 5.0 / 35.0, S_PLAY_XDIE7) { }<br>      S_P_XDIE7('PLAY', 20, 'players/doomguy/xplode.md2', 6, 5.0 / 35.0, S_PLAY_XDIE8) { }<br>      S_P_XDIE8('PLAY', 21, 'players/doomguy/xplode.md2', 7, 5.0 / 35.0, S_PLAY_XDIE9) { }<br>      S_P_XDIE9('PLAY', 22, 'players/doomguy/xplode.md2', 8, -1.0, S_NULL) { }<br>}<br><br>defaultproperties<br>{<br>      Health = 20;<br>      GibsHealth = -20;<br>      Radius = 20.0;<br>      Height = 56.0;<br>      Mass = 100.0;<br>      StepSpeed = 8.0;<br>      PainChance = 0.78125;<br>      IdleState = S_P_STND;<br>      SeeState = S_P_RUN1;<br>      MissileState = S_P_ATK1;<br>      PainState = S_P_PAIN;<br>      DeathState = S_P_DIE1;<br>      GibsDeathState = S_P_XDIE1;<br>      <br>      SightSound = 'ZombieSight1';<br>      ActiveSound = 'ZombieActive';<br>      AttackSound = 'PistolFire';<br>      PainSound = 'ZombiePain';<br>      DeathSound = 'ZombieDeath1';<br>}<br><br><br><br>//**************************************************************************<br>//<br>//  $Log: Marine.vc,v $<br>//  Revision 1.1  2002/10/26 16:32:19  dj_jl<br>//  New style of defining classes.<br>//<br>//**************************************************************************<br>
Thu, 08 Apr 2004 16:40:16

Janis Legzdinsh

Zombieman in states had A_Look and A_Chase functions. You should similary put such functions, such as A_FriendlyLook and A_FriendlyChase (you''ll have to create them) to make him do something.<br><br>As of weapon, player model itself is without model, por players the weapon model for current weapon is attached to the main model. Since your marine is not a player, it will not have a model.
Fri, 09 Apr 2004 04:15:16

gunrock

It seem's a little tough now. Is there some .vc file<br>i would have to edit  the new functions in and then <br> put them in my marine .vc file so it would work?<br>i thought all the functions came from the actor.vc file?
Fri, 09 Apr 2004 16:45:10

Janis Legzdinsh

Just copy the functions A_Look and A_Chase to your marine .vc file, rename them and then modify them.
Sat, 10 Apr 2004 14:40:56

gunrock

Okay i did all that and it still didn't work  >:(<br>there must be more editing to it that<br>i just don't know about  ???<br><br>class Marine:Pawn<br>       __mobjinfo__(230);<br><br><br>//==========================================================================<br>//<br>//      A_FriendlyLook<br>//<br>//  Stay in state until a player is sighted<br>//<br>//==========================================================================<br><br>void A_FriendlyLook(void)<br>{<br>      Actor targ;<br><br>      Threshold = 0;      // any shot will wake up<br>      targ = Actor(Sector->SoundTarget);<br><br>      if (targ && targ.bShootable)<br>      {<br>            Enemy = targ;<br><br>            if (bAmbush)<br>            {<br>                  if (!CanSee(Enemy))<br>                  {<br>                        if (!LookForPlayers(false))<br>                              return;<br>                  }<br>            }<br>      }<br>      else<br>      {<br>            if (!LookForPlayers(false))<br>                  return;<br>      }<br><br>      // go into chase state<br>      if (SightSound)<br>      {<br>            name sound;<br><br>            sound = SightSound;<br>            if (sound == 'ZombieSight1' || sound == 'ZombieSight2' ||<br>                  sound == 'ZombieSight3')<br>            {<br>                  switch (P_Random() % 3)<br>                  {<br>                  case 0:<br>                        sound = 'ZombieSight1';<br>                        break;<br>                  case 1:<br>                        sound = 'ZombieSight2';<br>                        break;<br>                  case 2:<br>                        sound = 'ZombieSight3';<br>                        break;<br>                  }<br>            }<br>            if (sound == 'ImpSight1' || sound == 'ImpSight2')<br>            {<br>                  switch (P_Random() % 2)<br>                  {<br>                  case 0:<br>                        sound = 'ImpSight1';<br>                        break;<br>                  case 1:<br>                        sound = 'ImpSight2';<br>                        break;<br>                  }<br>            }<br><br>            if (bBoss)<br>            {<br>                  // Full volume<br>                  PlayFullVolumeSound(sound, CHAN_VOICE);<br>            }<br>            else<br>            {<br>                  PlaySound(sound, CHAN_VOICE);<br>            }<br>      }<br><br>#ifdef DDF<br>      if (SeeState)<br>#endif<br>      {<br>            SetState(SeeState);<br>      }<br>}<br><br>//==========================================================================<br>//<br>//      A_FriendlyChase<br>//<br>//  Actor has a melee attack, so it tries to close as fast as possible<br>//<br>//==========================================================================<br><br>void A_FriendlyChase(void)<br>{<br>      float delta;<br><br>      if (ReactionCount)<br>      {<br>            ReactionCount--;<br>      }<br><br>      //  Remove muzzle flash<br>      if ((Effects & EF_DLIGHT_MASK) == EF_DL_MUZZLEFLASH)<br>      {<br>            Effects &= ~EF_DLIGHT_MASK;<br>      }<br><br>      // modify target threshold<br>      if (Threshold)<br>      {<br>            if (!Enemy || Enemy.Health <= 0)<br>            {<br>                  Threshold = 0;<br>            }<br>            else<br>            {<br>                  Threshold--;<br>            }<br>      }<br><br>/*      if (fastparm)<br>      { // Monsters move faster in nightmare mode<br>            actor->tics -= actor->tics / 2;<br>            if (actor->tics < 3)<br>            {<br>                  actor->tics = 3;<br>            }<br>      }<br>*/<br>      // turn towards movement direction if not there yet<br>      if (MoveDir < <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --><br>      {<br>            Angles.yaw = itof(ftoi(Angles.yaw / 45.0)) * 45.0;<br><br>            delta = AngleMod180(Angles.yaw - itof(MoveDir) * 45.0);<br><br>            if (delta > 0.0)<br>            {<br>                  Angles.yaw -= 45.0;<br>            }<br>            else if (delta < 0.0)<br>            {<br>                  Angles.yaw += 45.0;<br>            }<br>      }<br><br>      if (!Enemy || !Enemy.bShootable)<br>      {<br>            // look for a new target<br>            if (LookForPlayers(true))<br>            {<br>                  return;      // got a new target<br>            }<br>            SetState(IdleState);<br>            return;<br>      }<br><br>      // do not attack twice in a row<br>      if (bJustAttacked)<br>      {<br>            bJustAttacked = false;<br>            if (!fastparm)<br>            {<br>                  NewChaseDir();<br>            }<br>            return;<br>      }<br><br>      // check for melee attack<br>      if (MeleeState && CheckMeleeRange())<br>      {<br>            if (AttackSound)<br>            {<br>                  PlaySound(AttackSound, CHAN_WEAPON);<br>            }<br>            SetState(MeleeState);<br>            return;<br>      }<br><br>      // check for missile attack<br>      if (MissileState)<br>      {<br>            if (fastparm || !MoveCount)<br>            {<br>                  if (CheckMissileRange())<br>                  {<br>                        SetState(MissileState);<br>                        bJustAttacked = true;<br>                        return;<br>                  }<br>            }<br>      }<br><br>      // possibly choose another target<br>      if (netgame && !Threshold)<br>      {<br>            if (!CanSee(Enemy))<br>            {<br>                  if (LookForPlayers(true))<br>                        return;      // got a new target<br>            }<br>      }<br><br>      // chase towards player<br>      if (--MoveCount < 0 || !StepMove())<br>      {<br>            NewChaseDir();<br>      }<br><br>      // make active sound<br>      if (ActiveSound && P_Random() < 3)<br>      {<br>            PlaySound(ActiveSound, CHAN_VOICE);<br>      }<br>}<br><br><br>
Sat, 10 Apr 2004 14:41:48

gunrock

states__<br>{<br>      S_P_STND('PLAY', 0, 'players/doomguy/tris.md2', 0, -1.0, S_NULL) {A_FriendlyLook(); }<br>      S_P_RUN1('PLAY', 0, 'players/doomguy/tris.md2', 1, 4.0 / 35.0, S_PLAY_RUN2) {A_FriendlyChase(); }<br>      S_P_RUN2('PLAY', 1, 'players/doomguy/tris.md2', 2, 4.0 / 35.0, S_PLAY_RUN3) {A_FriendlyChase(); }<br>      S_P_RUN3('PLAY', 2, 'players/doomguy/tris.md2', 3, 4.0 / 35.0, S_PLAY_RUN4) {A_FriendlyChase(); }<br>      S_P_RUN4('PLAY', 3, 'players/doomguy/tris.md2', 4, 4.0 / 35.0, S_PLAY_RUN1) {A_FriendlyChase(); }<br>      S_P_ATK1('PLAY', 4, 'players/doomguy/tris.md2', 5, 12.0 / 35.0, S_PLAY) { }<br>      S_P_ATK2('PLAY', 5 | FF_FULLBRIGHT, 'players/doomguy/tris.md2', 6, 6.0 / 35.0, S_PLAY_ATK1) {}<br>      S_P_PAIN('PLAY', 6, 'players/doomguy/tris.md2', 7, 4.0 / 35.0, S_PLAY_PAIN2) { }<br>      S_P_PAIN2('PLAY', 6, 'players/doomguy/tris.md2', 8, 4.0 / 35.0, S_PLAY) { A_Pain(); }<br>      S_P_DIE1('PLAY', 7, 'players/doomguy/tris.md2', 9, 10.0 / 35.0, S_PLAY_DIE2) { }<br>      S_P_DIE2('PLAY', 8, 'players/doomguy/tris.md2', 10, 10.0 / 35.0, S_PLAY_DIE3) { A_PlayerScream(); }<br>      S_P_DIE3('PLAY', 9, 'players/doomguy/tris.md2', 11, 10.0 / 35.0, S_PLAY_DIE4) { A_Fall(); }<br>      S_P_DIE4('PLAY', 10, 'players/doomguy/tris.md2', 12, 10.0 / 35.0, S_PLAY_DIE5) { }<br>      S_P_DIE5('PLAY', 11, 'players/doomguy/tris.md2', 13, 10.0 / 35.0, S_PLAY_DIE6) { }<br>      S_P_DIE6('PLAY', 12, 'players/doomguy/tris.md2', 14, 10.0 / 35.0, S_PLAY_DIE7) { }<br>      S_P_DIE7('PLAY', 13, 'players/doomguy/tris.md2', 15, -1.0, S_NULL) { }<br>      S_P_XDIE1('PLAY', 14, 'players/doomguy/xplode.md2', 0, 5.0 / 35.0, S_PLAY_XDIE2) { }<br>      S_P_XDIE2('PLAY', 15, 'players/doomguy/xplode.md2', 1, 5.0 / 35.0, S_PLAY_XDIE3) { A_XScream(); }<br>      S_P_XDIE3('PLAY', 16, 'players/doomguy/xplode.md2', 2, 5.0 / 35.0, S_PLAY_XDIE4) { A_Fall(); }<br>      S_P_XDIE4('PLAY', 17, 'players/doomguy/xplode.md2', 3, 5.0 / 35.0, S_PLAY_XDIE5) { }<br>      S_P_XDIE5('PLAY', 18, 'players/doomguy/xplode.md2', 4, 5.0 / 35.0, S_PLAY_XDIE6) { }<br>      S_P_XDIE6('PLAY', 19, 'players/doomguy/xplode.md2', 5, 5.0 / 35.0, S_PLAY_XDIE7) { }<br>      S_P_XDIE7('PLAY', 20, 'players/doomguy/xplode.md2', 6, 5.0 / 35.0, S_PLAY_XDIE8) { }<br>      S_P_XDIE8('PLAY', 21, 'players/doomguy/xplode.md2', 7, 5.0 / 35.0, S_PLAY_XDIE9) { }<br>      S_P_XDIE9('PLAY', 22, 'players/doomguy/xplode.md2', 8, -1.0, S_NULL) { }<br>}<br><br>defaultproperties<br>{<br>      Health = 20;<br>      GibsHealth = -20;<br>      Radius = 20.0;<br>      Height = 56.0;<br>      Mass = 100.0;<br>      StepSpeed = 8.0;<br>      PainChance = 0.78125;<br>      IdleState = S_P_STND;<br>      SeeState = S_P_RUN1;<br>      MissileState = S_P_ATK1;<br>      PainState = S_P_PAIN;<br>      DeathState = S_P_DIE1;<br>      GibsDeathState = S_P_XDIE1;<br>      <br>      SightSound = 'ZombieSight1';<br>      ActiveSound = 'ZombieActive';<br>      AttackSound = 'PistolFire';<br>      PainSound = 'ZombiePain';<br>      DeathSound = 'ZombieDeath1';<br>}<br><br><br><br>//**************************************************************************<br>//<br>//  $Log: Marine.vc,v $<br>//  Revision 1.1  2002/10/26 16:32:19  dj_jl<br>//  New style of defining classes.<br>//<br>//**************************************************************************<br>
Mon, 12 Apr 2004 16:52:31

Janis Legzdinsh

Try something like this.<br><br>[pre]//========================================================================== <br>// <br>// A_FriendlyLook <br>// <br>//
Tue, 13 Apr 2004 01:48:23

gunrock

That still didn't work, Could i just sent it to you<br>and you could like take a peek at it  ???
Tue, 13 Apr 2004 06:04:33

gunrock

I just uploaded it to you. zipped up as gun folder<br>and soon as you play the mod the marine just sits there.
Sat, 01 May 2004 05:35:19

gunrock

So far i just redone the marine\monster. The thing is it<br>attacks both monsters and players alike. is there a way <br>i can make the marine\monster ignor the player?
Mon, 03 May 2004 17:25:07

Janis Legzdinsh

With a little bit of extra code it should be prety easy. All you need to add is checks to see if enemy is player, and if so, ignore it. Probably this would require a new search for monsters function that ignores players and some changed in Damage function to not get angry at players.

Back to the Vavoom Forum Archives