Jump to content
Sign in to follow this  
smacker909

Civilian question

Recommended Posts

In my mission, I've added a chance for some civs to pull a pistol and turn hostile when trying to detain. Since female civs can't have weapons, I wanted to NOT give the chance, if the civ is female. I use the ALICE module to create the civs. I see most femails have "Woman" in the class name..(ex. TK_CIV_Woman01_EP1). Is there a way to determine if my "civ to detain" has "Woman" in the name?

Share this post


Link to post
Share on other sites

You can have a script to check for Woman in the string but as there aren't that many women and some don't have woman in the description it may be better to just make an array of possible types, I think there are only six TK_CIV_Woman.

If your getting women from other groups just add them to the array.

array

Woman=["TK_CIV_Woman01_EP1","TK_CIV_Woman02_EP1","TK_CIV_Woman03_EP1", "CIV_EuroWoman01_EP1","CIV_EuroWoman02_EP1","Rita_Ensler_EP1"]

Check to find woman type in array

{ if ( typeof _x in Woman) then {// addyour code here //}} foreach nearestobjects [getpos logic,["man"],5000]

Share this post


Link to post
Share on other sites

Thanks! Tried out SaMatra's code and worked like a charm. Im sure that F2k's code would have done the trick too.

--

btw - the browser.six-projects.net/ tool is a great resource ;) Thanks for the link

Edited by smacker909

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  

×