Checking for multiple keywords on a single object?

Post » Tue Jun 19, 2012 7:43 pm

Basically I am wondering if there is any way to check for multiple keywords on a single object, since hasKeyword has only one parameter? So I can filter an object that hasKyeword(abc) AND hasKeyword(cba)?

Any ideas?
User avatar
Joanne
 
Posts: 3357
Joined: Fri Oct 27, 2006 1:25 pm

Post » Tue Jun 19, 2012 4:43 pm

If you need to check multiple conditions, just use the http://www.creationkit.com/Operator_Reference#Logical_Operators operator or some nested conditional statements. I don't think http://www.creationkit.com/HasKeyword_-_Form will accept a http://www.creationkit.com/FormList_Script, but you could also try that approach.

Cipscis
User avatar
Farrah Barry
 
Posts: 3523
Joined: Mon Dec 04, 2006 4:00 pm

Post » Wed Jun 20, 2012 2:33 am

Thanks, but what I am unsure of is how it will behave from a logical standpoint - since WornHasKeyword (I used the wrong example, sorry, HasKeyword will work since it accepts specific object references, but WornHasKeyword is very ambiguous) as an argument accepts only one parameter, and returns a bool, using two such statements linked with an && will likely produce confusing results if the player, for example, wears both an iron cuirass and leather gloves.

I can try with the form list, or failing that, custom keywords. I just thought it would be nice if there was a way to quickly determine what kind of item a player is wearing at a time, since Bethesda already supplied us with item type and material type keywords...
User avatar
lillian luna
 
Posts: 3432
Joined: Thu Aug 31, 2006 9:43 pm


Return to V - Skyrim