Defining a new armour.

Sirren67

Look, Ma! Two Heads!
I need a critter to open a door if dude wears a particular armour (this condition will be checked more times, so I need it, it's plot related)... A fake combat armour, actually... Apparently the script cannot tell if dude is wearing it or not. I always get a "No answer" related to dude not wearing it.
I defined my new item in itempid.H. I'm positive that the script does not work with only this header edited. I snooped in command.H and define.H. I found nothing, so I thougth that condition.H is the right one.... Actually I found conditions defined for armours worn, but I was unable to successfully edit this header. I tried to use a commented condition (n. 24, combat armour), but it did not work. Apparently I can't add more conditions in the armour sections of the header, because all conditions are in numerical order and there are no empty spaces...
Now:
A) Since armours worn are "defined" in a header they're not hardcoded, right?
B) Can I add my new condition at the end of the the armour list or at the end of the header, and how?
C) Is define.H the right header or I'm terribly mistaken?
D) Can this be done at all?
Thank you in advance.
 
Ok here we go :)

A)Yes
B) you can add your defines where you want(in script or in any included header file)
C)Define.h will do just fine.
D)Yes, and it's quite simple:

Code:
if obj_pid(critter_inven_obj(dude_obj,INVEN_TYPE_WORN)) == PID_COMBAT_ARMOR_MK_II)  then

Change PID_COMBAT_ARMOR_MK_II to armour that you want to check and thats all.
 
Back
Top