1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

[Request] - Zombie AI. [Solved]

Discussion in 'Requests' started by kaizokuroof, Nov 8, 2015.

  1. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Hey Guys and Gals,

    I'm working on fixing my Kag of Duty: Zombies gametype from a while back and to speed things up, I'm seeking modders help!
    I need some basic zombie AI that doesn't suck too hard, nothing super complex but it's probably something out of my reach at this time. Some suggestions/requests below:

    What's needed:
    - Track and attack player, IE, zombies spawn on a side of the map and need to walk towards the player and attack them, much like the old Classic zombies.

    Optional:
    - Breaking materials, such as stone/dirt to find the player.
    - Climbing skeletons (classic)

    And if possible, as simple as you can make it. If you do this for me, you of course will be credited and loved even more by kaizokuroof. If you want some more incentives, contact me via PM and perhaps we can work something out ^^

    <3 - kaizo!
     
    blackjoker77777 and makmoud98 like this.
  2. 0DarkShadow0

    0DarkShadow0 Shark Slayer

    Messages:
    3
    Based on your mod's current way of searching for players. You could just increase the search radius, as I have done.
    So to do this you could:
    1. Find the Zombie Brain file in the "Entities/Natural/EvilEnemies/Scripts" folder.
    2. Search for line 22, "blob.set_f32(target_searchrad_property, 32.0f);"
    3. Increase the 32.0 to whatever you'd like the search radius to be.
    I think this is what you were looking for, however I plan on redesigning the zombie AI to be much cleaner and more efficient. So when I get time to do that, I'll be glad to share it with you.
    As for breaking dirt, one way to do it would be to modify the individual zombie type's ".as" file, and change a specific line as so:
    1. Find the individual zombie types ".as" file. Ex. "Zombie.as".
    2. Find the line that contains "if ( !this.getMap().isTileGroundStuff( tile ) ) {".
    3. Remove that line, and the curly bracket on the line after "this.getMap().server_DestroyTile(tp, 0.1);"
    I hope I was able to assist you in this problem. However, the method I provided for breaking dirt, I have not personally tested. So I cannot guarantee that it works, as for my mod I have done the requested task differently.
     
  3. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Hey,

    Cheers for the reply, however, someone provided me with a much nicer load of AI for the zombies. I just haven't updated the resource yet. As for braking dirt with that method, it's very hit and miss. Those zombies were designed with variables in the ruleset, so messing with them can have undesired effects. Good luck with your fork and feel free to put the AI up here and if I think it fits better I'll put it in the resource.