Jump to content

Question: Bind multiple actions to one key including 1 script

Recommended Posts

Hey everyone,


I'm playing around with scripting to solve some of the NPC issues in JK3 singleplayer.


For example I'd like to have a Carth model using the dual blaster pistols which the Cultist Commando uses, but I noticed he loses the 2nd blaster as soon as he is set to the Playerteam (on Enemy Team 2nd blaster works).


So I found an awesome script by Nikomaru that allowed me to switch the NPC's playerteam ingame and to avoid micromanagement everytime I'd like to ask the following:

I'd like bind spawning this NPC and switching his side to one button, having this in mind:

bind x "npc spawn carth x;runscript x switch_player"

Now for other binds multiple actions work fine, but in this instance the NPC spawns but his team is not changed and he keeps firing at me :-P. 

Any way to change my bind command to fix this? Thanks in advance for any reply.

Smoo likes this
Link to comment
  • 1 month later...
22 hours ago, Circa said:

Try adding a wait command in between them:

bind x "npc spawn carth x;wait 1;runscript x switch_player"

Thanks Circa, I tried but unfortunately it still did not pick up the Runscript command. The problem is somehow in that runscript because if I try the same command line with any other command in JKA it works.

Link to comment

That's correct. I also ran it 'manually' by simply typing it in after the npc was spawned and then it works.

I am thinking now about trying to sacrifice another key on the keyboard just for that script. Will need to test if that works, but was really hoping to link it all together. Got so many buttons linked to npc spawning already 😛 


EDIT: Alright creating 2 binds for both separate actions does the trick. Still if you have any remaining ideas I'd appreciate the help 🙂 

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...