Announcement

Collapse
No announcement yet.

TUTORIAL - How To Make A Zombie / Wandering / Roaming Monster

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    i guess not but, how do you make a zombie play "possom" and as soon as a player gets close, it comes to life? and how do u make it react to sound/light?

    Comment


      #17
      Is there anyway to change the DamageType of when this zombie touches you?

      Edit: Nevermind, I think you answered that already.

      Comment


        #18
        Originally posted by Lord Vipes View Post
        i guess not but, how do you make a zombie play "possom" and as soon as a player gets close, it comes to life? and how do u make it react to sound/light?
        I think that this may be done by using similar code as seen in the spider mines. The mines just sit there until someone gets close. Are you thinking of making the zombies work "halo" style (like the flood, they are dead until you are closer to them then they get up to attack you)?

        As for reacting to sound and light, I have no clue (in not a very experienced programmer)

        Comment


          #19
          Wait nevermind, the last bit of code you posted yappari was for something different.. Anyway, how do you make the zombie DamageType say something else instead of "<Player> was eviscerated". I know... I already asked this.

          Comment


            #20
            Originally posted by poltomb View Post
            I think that this may be done by using similar code as seen in the spider mines. The mines just sit there until someone gets close. Are you thinking of making the zombies work "halo" style (like the flood, they are dead until you are closer to them then they get up to attack you)?

            As for reacting to sound and light, I have no clue (in not a very experienced programmer)
            Nope im thinking of the Doom3 zombies how they can scare the sh** outta you becouse they wait till you bassicly standing on it

            Comment


              #21
              Originally posted by Zippy View Post
              Wait nevermind, the last bit of code you posted yappari was for something different.. Anyway, how do you make the zombie DamageType say something else instead of "<Player> was eviscerated". I know... I already asked this.
              Here's how I've done it...

              Code:
              function bool MeleeDamagePupae(int hitdamage, vector pushdir)
              {
              	local vector HitLocation, HitNormal;
              	local actor HitActor;
              	
              	// check if still in melee range
              	If ( (Controller.target != None) && (VSize(Controller.Target.Location - Location) <= MeleeRange * 1.4 + Controller.Target.CollisionRadius + CollisionRadius)
              		&& ((Physics == PHYS_Flying) || (Physics == PHYS_Swimming) || (Abs(Location.Z - Controller.Target.Location.Z) 
              			<= FMax(CollisionHeight, Controller.Target.CollisionHeight) + 0.5 * FMin(CollisionHeight, Controller.Target.CollisionHeight))) )
              	{	
              		HitActor = Trace(HitLocation, HitNormal, Controller.Target.Location, Location, false);
              		if ( HitActor != None )
              			return false;
              		Controller.Target.TakeDamage(hitdamage, self,HitLocation, pushdir, class'DamTypePupaeMelee');
              		return true;
              	}
              	return false;
              }
              I simply copied the MeleeDamageTarget, pasted it into my monster with a different name (MeleeDamagewhatever), made it point to a different DamType other then MeleeDamage.

              Then, you look for lines like:

              Code:
              MeleeDamageTarget(12, (20000.0 * Normal(Controller.Target.Location - Location)));
              That's what makes the monster actually meleedamage enemies. You Replace MeleeDamageTarget with your function above.

              I assume you know how to make the DamType itself.

              Comment


                #22
                I'd hate to be a pest, but feel compelled to plug Old Skool Monsta Toolz one last time on this thread. OSMT includes many of the behaviors requested here, but imo solves some problems this thread hasn't even addressed yet. [/my $0.02] Good luck.

                Comment


                  #23
                  Bumping this post so anyone who was still not clear with the AI can get an idea and see what it's like in action. I just posted my team's game up in the User Maps and Mods forums. In the game pretty much every monster is derived from the basic AI I set up in this tutorial.

                  If you leave the monsters alone, you'll see that they roam around by themselves randomly along with all the other behavior I detailed in the tutorial. Hope this helps anyone who might have gotten lost with this.

                  You can find the game here, it's called Welcome to Wilshire Heights:
                  http://forums.epicgames.com/showthread.php?t=588111

                  Originally posted by Zippy View Post
                  Wait nevermind, the last bit of code you posted yappari was for something different.. Anyway, how do you make the zombie DamageType say something else instead of "<Player> was eviscerated". I know... I already asked this.
                  Zippy, this response is 4 months late and I don't even know if you'll ever see this, but to answer your question, it's easy. Just put this code in your default properties for your DamType:

                  Code:
                  defaultproperties
                  {
                       DeathString="%o was whatever you want to have happened!"
                  }
                  Originally posted by SuperApe View Post
                  I'd hate to be a pest, but feel compelled to plug Old Skool Monsta Toolz one last time on this thread. OSMT includes many of the behaviors requested here, but imo solves some problems this thread hasn't even addressed yet. [/my $0.02] Good luck.
                  SuperApe, you're right. This tutorial is meant as a quick fix and is not as extensive as OSMT. The code here is all designed for the specific functions we needed for our game, which happens to be stereotypical wandering zombie behavior.

                  Comment

                  Working...
                  X