Difference between revisions of "IsSpellTarget"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>JT
imported>JT
(tested -- is not working for Ingestibles (contrary to article before my edits))
Line 1: Line 1:
Returns 1 if the calling reference is currently being affected by the specified magic item (an [[Actor Effect]] (spell), an [[Object Effect]] (enchantment), or an [[Ingestible]] (potion)).
Returns 1 if the calling reference is currently being affected by the specified magic item (an [[Actor Effect]] (spell) or an [[Object Effect]] (enchantment)).


== Syntax ==
== Syntax ==
Line 9: Line 9:
This will return 1 if Buddy has the specified Actor Ability.
This will return 1 if Buddy has the specified Actor Ability.


== Detecting addictions ==
== Notes ==
 
=== Detecting addictions ===


If an actor is addicted to a chem, this function will return 1 when the addiction Actor Effect is passed to this function, even when the actor is not presently undergoing withdrawal symptoms.  You can use this to detect whether the player is addicted to a substance.
If an actor is addicted to a chem, this function will return 1 when the addiction Actor Effect is passed to this function, even when the actor is not presently undergoing withdrawal symptoms.  You can use this to detect whether the player is addicted to a substance.
Line 17: Line 19:


This will return 1 even if the player has recently consumed alcohol and is not presently undergoing withdrawal.  It will return 0 for a player who is not addicted to alcohol.
This will return 1 even if the player has recently consumed alcohol and is not presently undergoing withdrawal.  It will return 0 for a player who is not addicted to alcohol.
=== Ingestibles ===
Unfortunately, this function does not detect whether you are under the influence of a particular [[Ingestible]] (potion, chem, food item, etc.).


== See Also ==  
== See Also ==  
[[HasMagicEffect]]  
[[HasMagicEffect]]


[[Category: Functions]]
[[Category: Functions]]
[[Category:Game Effect Functions]]
[[Category:Game Effect Functions]]
[[Category: Condition Functions]]
[[Category: Condition Functions]]

Revision as of 19:39, 14 January 2009

Returns 1 if the calling reference is currently being affected by the specified magic item (an Actor Effect (spell) or an Object Effect (enchantment)).

Syntax

[ActorRef.]IsSpellTarget MagicID 

Example

BuddyRef.IsSpellTarget TrainingMedicineHigh

This will return 1 if Buddy has the specified Actor Ability.

Notes

Detecting addictions

If an actor is addicted to a chem, this function will return 1 when the addiction Actor Effect is passed to this function, even when the actor is not presently undergoing withdrawal symptoms. You can use this to detect whether the player is addicted to a substance.

Example:

Player.IsSpellTarget WithdrawalAlcohol

This will return 1 even if the player has recently consumed alcohol and is not presently undergoing withdrawal. It will return 0 for a player who is not addicted to alcohol.

Ingestibles

Unfortunately, this function does not detect whether you are under the influence of a particular Ingestible (potion, chem, food item, etc.).

See Also

HasMagicEffect