1. Forums
  2. Discord
  3. About Mapcore
  4. Patreon Supporters
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • More Options
  1. Mapcore
  2. Vault
  3. Archived Forums
  4. Non-Professional Recruitment

In need of coding help

  • robert.briscoe
  • June 9, 2008 at 10:32 PM
  • robert.briscoe
    • June 9, 2008 at 10:32 PM
    • #1

    Hi,

    So I have recently started planning out an idea of a small SP mod for the source engine which i plan to make over the summer and release around October. Without going into the intricate details of the mod it's self Im toying with using either hl2's npc zombies or ideally having slightly modified versions which act slightly differently than they currently do.

    Of course the latter needs code work which as an artist is way out of my league, but im wondering if anyone here would be willing to help me out, or at least give me an idea how hard it would be, from a coders point of view, to implement it into a mod.

    To give you an idea of exactly what im looking for here is a basic description:

    A way of LODing out the AI if the zombie is at a certain distance from the player.

    For example: Once the player is 2048 units away from the NPC it will cease all AI and just play an idle animation remaining in a 'sleep state' until the player is within 2048 units radius of the NPC.

    The reason for this is that im thinking of ways to have alot of zombie NPCs spread over a large area without clogging up the CPU on pointless walking and pathfinding stuff like they do now while they idle.

    Secondly, I recently played the latest version of SMOD and noticed they they added a pretty cool new type of zombie as shown in this video from SMOD: Tactical:


    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
    It seems like a pretty simple AI modification to an NPC citizen or something, where they are idle until they see or hear the player then just run straight at them causing damage if they come into close contact with the player. They also seem to run to random path nodes whilst searching for the player also which also crude looks pretty convincing!

    If you're now thinking "why dont you just use SMOD?" its because they have no source code to implement the zombie LOD system which is more important atm and SMOD is not very mapper/modder friendly (it doesnt even have a FDG entity file for hammer). I also need to use some Orange box specific features for the mod to have some outstanding visuals.

    Anyway any advice or help anyone can offer would be greatly appreciated!

    Thanks!

  • Pampers
    • June 9, 2008 at 11:32 PM
    • #2

    afaik NPCs can already be put in a sleep state without any additional coding

  • Sentura
    • June 10, 2008 at 12:47 AM
    • #3

    yeah i was about to say you could probably do it with some I/O scripting. having a trigger parented to a zombie that toggles the zombie state depending on where the player is located. it would get messy, and i am not sure how well you could actually incapsulate it to save resources, but none the less, it is possible.. although yeah, source could benefit from a decent scripting language :\

  • Pampers
    • June 10, 2008 at 2:01 AM
    • #4

    NPCs can change state depending on the distance to the player

  • robert.briscoe
    • June 10, 2008 at 8:39 AM
    • #5
    Quote from Sentura

    yeah i was about to say you could probably do it with some I/O scripting. having a trigger parented to a zombie that toggles the zombie state depending on where the player is located. it would get messy, and i am not sure how well you could actually incapsulate it to save resources, but none the less, it is possible.. although yeah, source could benefit from a decent scripting language :\

    Yes this is similar to something to a method I thought of also, the problem I encountered was that when I need to spawn additional zombies how do I create additional trigger brushes dynamically for them?

    I've yet to look at the zombie npc's "sleep state" yet to see how optimised it is, but I will perform some tests this evening to determin if its useful or not.

    Quote from Pampers

    NPCs can change state depending on the distance to the player

    Are you referring to Sentura's method above or something else? If so please elaborate.

    Thanks!

  • Sentura
    • June 10, 2008 at 11:59 AM
    • #6

    that would be tricky. i can imagine it done through a point_template entity, where the first template is the actual zombie and the second being the trigger, the trigger STILL parented to the zombie. this could reduce the mess quite a lot since you just keep making an instance of the template.

  • Pampers
    • June 10, 2008 at 12:14 PM
    • #7

    theres lots of info on the sdk about the subject, take a look here: http://developer.valvesoftware.com/wiki/Npc_zombie and scroll down to sleepstate

  • Jetsetlemming
    • June 10, 2008 at 4:48 PM
    • #8

    I hope you make those zombies far back from the player culled from view as well...

  • robert.briscoe
    • June 10, 2008 at 6:38 PM
    • #9
    Quote from Sentura

    that would be tricky. i can imagine it done through a point_template entity, where the first template is the actual zombie and the second being the trigger, the trigger STILL parented to the zombie. this could reduce the mess quite a lot since you just keep making an instance of the template.

    Thanks! I think i may give this a try later tonight and see what happens.

    Quote from Jetsetlemming

    I hope you make those zombies far back from the player culled from view as well...

    Yeah exactly, thats why I want them to be dormant when at a certain distance when they are not visible and culled (by fog for example). Atm, they still take up cpu time idling around walking in circles etc.

    Quote from Pampers

    theres lots of info on the sdk about the subject, take a look here: http://developer.valvesoftware.com/wiki/Npc_zombie and scroll down to sleepstate

    Gonna browse though that now, thanks.

    Any coders have ideas about the modified zombie citizen in the video I posted?

    Thanks!

  • robert.briscoe
    • June 12, 2008 at 8:46 PM
    • #10

    Just out of curiosity, does any know a coder who whould be up for helping me test these tweaks for some cash? If not does anyone know a good place to find source engine coders?

    Im hoping something like this shouldnt take up more than a few hours (but then what do I know! ).

    Thanks

  • R_Yell
    • June 12, 2008 at 9:18 PM
    • #11

    I'm interested in this kind of AI related things, I could try to help but can't assure any success heh. I'm experienced enough to give it a try at least, but I'm new to AI as that's not used in FoF. The LOD control should be easy, sure, but I'm not available at this moment. I'm preparing the next update for my mod, after that I should have more free time for other stuff.

    Try these places and maybe someone will help you, if that's not the case I should be free in 2 or 3 weeks (not cash involved, just voluntary help)

    http://forums.steampowered.com/forums/f ... .php?f=195

    GameSurge IRC network: #hlcoders

    Coders mail list http://list.valvesoftware.com/mailman/listinfo/hlcoders

  • robert.briscoe
    • June 12, 2008 at 9:34 PM
    • #12

    Ok thanks I will check thos out, and thanks for the offer, just let me know when you are free.

  • robert.briscoe
    • June 14, 2008 at 10:22 PM
    • #13

    Hmm well just thought i'd have an experiement with triggering the zombie to go into a sleep state today, and discovered to my joy, that there isnt an input to make the zombie go back to sleep!

    This is really frustrating since I cant even experiment with it myself now. Looks like it has to be coded after all.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login
Discord

The Mapcore Discord is our lively IRC channel of the 2000s reborn. Chat about level design, gaming, and more.

Latest Posts

  1. Tangerine

    Harry Poster
    July 18, 2026 at 11:10 AM
  2. Any of the old guard still around? D:

    Warby
    July 12, 2026 at 8:23 PM
  3. About our archived forums

    Thrik
    June 30, 2026 at 2:12 PM
  4. Mapcore Discord

    mason_fan123
    June 24, 2026 at 8:52 PM
  5. [CS2] Valley

    Serialmapper
    June 22, 2026 at 11:56 AM
  6. Free Music / SFX Resource - Over 2500 Tracks

    Eric Matyas
    June 18, 2026 at 12:32 PM
  7. Pango [WIP]

    Elowen
    June 11, 2026 at 10:13 AM
  8. [CS2] Dvina

    Jeremy Rivera
    June 11, 2026 at 10:03 AM
  9. Bridges 2.0 by NEXSIDE, MAP SHOWCASE. ( Steam Workshop )

    MrTrane18
    June 1, 2026 at 7:46 PM
  10. Classic Maps Reborn For CS2

    SillySpaceCat
    May 31, 2026 at 10:33 PM
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™