Jump to content
dakotanowak76

How can I make enemies not attack unarmed players?

Recommended Posts

So I'm trying to make a mission that allows players to dress as civilians to gather Intel close to enemy positions without being attacked. I saw a script that was something like: 

this setCaptive true; (in my player init) 

The use a trigger with: 

currentWeapon player == primaryWeapon player;

(In the trigger conditions) and:

 Player setCaptive false; 

But it doesn't work. I can drop my weapons and approach the enemy but they still fire at me. I don't know how to script but I think that instead of currentWeapon player, I need some way of scripting "if player has no weapon" then setCaptive true. Any thoughts? 

 

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Normal, with no weapon, primaryWeapon player and currentWeapon player  both return ""

You just need to check : currentWeapon player isNotEqualTo ""

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×