Jump to content
Sign in to follow this  
WallyJas

Conceal weapon / undercover unit

Recommended Posts

Guys I thought I could create a simple trigger that set the player as setCaptive false or true depending on whether they were using a certain weapon or not. This would enable them to play as an undercover unit or not depending on if they were using the main weapon or not.

The below is what I have in my trigger

Condition: VSS_Vintorez = currentWeapon player;

On Act: player setCaptive false;

On Dea: player setCaptive true;

Can anyone please tell me why it is not working?

*Note: I do not have this setCaptive true; in my players init field

Share this post


Link to post
Share on other sites

'=' sets a variable's value, whereas '==' compares them, so you need VSS_Vintorez == currentWeapon player;, assuming that the rest of the command is correct.

What you could also do is check if the player has -any- weapon out, and if so, then pass the condition, i.e. (!("" == currentWeapon player));, I think. Not 100% sure of that as I've never done a 'not-equal to' version of such a command :)

Share this post


Link to post
Share on other sites

Thanks for your help Dread ..... this is now what I have in my condition and onAct fields however I am not getting any joy. I thought adding the hint would help in testing to see if it is activated but no hint.

cond:

VSS_Vintorez == currentWeapon player;

onAct:

player setCaptive false; hint "You can now be targetted";

Any more ideas please?

Share this post


Link to post
Share on other sites

VSS_Vintorez is a class name you forgot the "".

cond:

"VSS_Vintorez" == currentWeapon player;

Share this post


Link to post
Share on other sites

Have you tried:

currentWeapon player == "VSS_Vintorez"

or:

secondaryWeapon player == "VSS_Vintorez"

or:

primaryWeapon player == "VSS_Vintorez"

(Don't recognize the weapon name, is it a rifle (primary) or pistol (secondary I think, unless that is for launchers etc.) ?)

Also try without quotes if it doesn't work, but I believe you have to search for a string with quotes.

Share this post


Link to post
Share on other sites

With the code above;

(!("" == currentWeapon player));

You can have a trigger activate when the player has ANY weapon out (apologies if you already realised this from what I said earlier).

A repro mission is included:

http://www.megaupload.com/?d=PESC8HFU

Just drop it into your 'Missions' folder alongside all your editor-based missions, and open it via editor. Removing weapon is done via the communication menu.

Regards,

- HateDread.

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
Sign in to follow this  

×