mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-29 23:15:55 -04:00
55 lines
2.3 KiB
Plaintext
55 lines
2.3 KiB
Plaintext
/** ATTRIBUTE CONSTS for interest-based TRIGGER VOLUME breaches
|
|
|
|
There are 7 script methods:
|
|
|
|
public static native void setAttributeAttained(obj_id serverObjectId, int attribute);
|
|
public static native void clearAttributeAttained(obj_id serverObjectId, int attribute);
|
|
public static native boolean hasAttributeAttained(obj_id serverObjectId, int attribute);
|
|
|
|
public static native void setAttributeInterested(obj_id serverObjectId, int attribute);
|
|
public static native void clearAttributeInterested(obj_id serverObjectId, int attribute);
|
|
public static native boolean hasAttributeInterested(obj_id serverObjectId, int attribute);
|
|
|
|
public static native boolean isInterested(obj_id serverObjectId1, obj_id serverObjectId2);
|
|
|
|
* The first 3 set, clear and test attributes that you have.
|
|
* The next 3 set, clear, and test the interests that you have.
|
|
* The final one you can pass 2 objects to it and it will tell you whether
|
|
the 1st is interested in the second.
|
|
|
|
* PLAYERS always breach trigger volumes
|
|
* NON-PLAYER objects will only breach trigger volumes if they have attained an attribute that
|
|
the trigger volume object is interested in.
|
|
e.g.:
|
|
* setAttributeAttained( creature, attrib.HERBIVORE );
|
|
* setAttributeAttained( creature, attrib.CREATURE );
|
|
* setAttributeInterested( npc, attrib.CARNIVORE );
|
|
* setAttributeInterested( monster, attrib.HERBIVORE );
|
|
Now if "creature" will breach the trigger volume on "monster",
|
|
because monster is interested in herbivores. Creature will not
|
|
breach the trigger volume on "npc", because npc is only interested
|
|
in carnivores.
|
|
|
|
Objects may have multiple attributes.
|
|
***/
|
|
|
|
const int ALL = 1;
|
|
const int HERBIVORE = 2;
|
|
const int CARNIVORE = 3;
|
|
const int MONSTER = 4;
|
|
const int NPC = 5;
|
|
const int REBEL = 6;
|
|
const int IMPERIAL = 7;
|
|
const int HUTT = 8;
|
|
const int TOWNSPERSON = 9;//townsperson is the same as townperson
|
|
const int TOWNPERSON = 9;//townsperson is the same as townperson
|
|
const int TUSKEN_RAIDER = 10;
|
|
const int GUARD = 11;//guards hate thugs
|
|
const int THUG = 12;//thugs hate guards and kill victims
|
|
const int VICTIM = 13;//victims hate thugs
|
|
const int VEHICLE = 14;
|
|
const int SPACE_SHIP = 15;
|
|
const int BEAST = 16;
|
|
const int OUTBREAK_SURVIVOR = 17;
|
|
const int OUTBREAK_AFFLICTED = 18;
|
|
const int OUTBREAK_SURVIVOR_GUARD = 19; |