Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Check if a certain style/passive feat is being used

Page: 1 of 1
 Pavlos
12-21-2005, 12:06 PM
#1
Is there a simple script which can be used to check if a certain sabre style or something to that effect is being used?
 stoffe
12-21-2005, 12:12 PM
#2
Is there a simple script which can be used to check if a certain sabre style or something to that effect is being used?

You can check which saber- or force-form an NPC currently has selected with the IsFormActive() scripting function. Set the first parameter to the NPC you wish to check and the second parameter to one of these constants:

FORM_SABER_I_SHII_CHO
FORM_SABER_II_MAKASHI
FORM_SABER_III_SORESU
FORM_SABER_IV_ATARU
FORM_SABER_V_SHIEN
FORM_SABER_VI_NIMAN
FORM_SABER_VII_JUYO
FORM_FORCE_I_FOCUS
FORM_FORCE_II_POTENCY
FORM_FORCE_III_AFFINITY
FORM_FORCE_IV_MASTERY

As for passive feats, they are always active, that's what makes them passive. So you can just use the GetHasFeat() function to check if the NPC knows the feat. The first parameter is the line number in feat.2da for the feat to check for, the second is the NPC to check.
Page: 1 of 1