Jump to content

How to find/use the 'Huntkill' script?

Recommended Posts

Hi all,

To boost my singleplayer experience I've seen on some forums that you can use a script called 'Huntkill' to make npc chase their enemies (not sure if this works on player only or also on other enemy NPCS but I hope to find out :-) ).


I'm afraid however that I can't seem to get it to work. 

I have seen the mention of the command ingame being:

runscript (targetname) huntkill


Whenever I spawn an NPC with a name for example

npc spawn sithtrooper sith

I was thinking 'sith' was the targetname, but when using that, the game can't find it. Then in some thread I saw a person mention there is an extra command talking about the affiliation (Light,Dark, Neutral). I also used that in the spawn so for example:

npc spawn sithtrooper dark_side sith

And then 'runscript dark_side huntkill' or 'runscript sith huntkill' and while this no longer gives any errors, npcs aren't chasing anyone and are still static.


Is there any way to get this to work? Or is the huntkill script also in need of waypoints in a map, and is that the reason it doesnt work?

Thanks for any reaction :-)

Droidy365 likes this
Link to comment
  • 1 month later...

The extra part you tried with (npc spawn sithtrooper dark_side sith) from what I understand is specific to Movie Duels, basically allowing you to make any NPC you spawn friend or foe. For base Jedi Academy and OpenJK, the correct syntax is the one you tried before: npc spawn sithtrooper sith. This spawns a Sith Trooper with the assigned targetname sith, which can be used for scripts.

Now, having said that, the huntkill falls in the category of behaviors. Supposedly they're special scripts that are used for various situations, but after trying multiple times in the past to get these "behavior" scripts working, I never managed to. Ultimately I'm not sure these even existed in the first place - the descriptions in NPC Spawner in Radiant seem to suggest they did, but I couldn't find any way to get them working. So maybe it was just a planned feature that never got past the concept.


spawnscript - default script to run once spawned (none by default)
usescript - default script to run when used (none by default)
awakescript - default script to run once awoken (none by default)
angerscript - default script to run once angered (none by default)
painscript - default script to run when hit (none by default)
fleescript - default script to run when hit and below 50% health (none by default)
deathscript - default script to run when killed (none by default)
These strings can be used to activate behaviors instead of scripts - these are checked
first and so no scripts should be names with these names:
    default - 0: whatever
    idle - 1: Stand around, do abolutely nothing
    roam - 2: Roam around, collect stuff
    walk - 3: Crouch-Walk toward their goals
    run - 4: Run toward their goals
    standshoot - 5: Stay in one spot and shoot- duck when neccesary
    standguard - 6: Wait around for an enemy
    patrol - 7: Follow a path, looking for enemies
    huntkill - 8: Track down enemies and kill them
    evade - 9: Run from enemies
    evadeshoot - 10: Run from enemies, shoot them if they hit you
    runshoot - 11: Run to your goal and shoot enemy when possible
    defend - 12: Defend an entity or spot?
    snipe - 13: Stay hidden, shoot enemy only when have perfect shot and back turned
    combat - 14: Attack, evade, use cover, move about, etc.  Full combat AI - id NPC code
    medic - 15: Go for lowest health buddy, hide and heal him.
    takecover - 16: Find nearest cover from enemies
    getammo - 17: Go get some ammo
    advancefight - 18: Go somewhere and fight along the way
    face - 19: turn until facing desired angles
    wait - 20: do nothing
    formation - 21: Maintain a formation
    crouch - 22: Crouch-walk toward their goals


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...