Difference between revisions of "IsAttacking"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>SpookyFX
imported>SpookyFX
Line 11: Line 11:


if MyRef.isattacking == 1 && MyRef.iscasting == 0
if MyRef.isattacking == 1 && MyRef.iscasting == 0
message"I am attacking but not casting!"
message"I am attacking but not casting!"
endif
endif


Line 17: Line 19:


if MyRef.AnimPathIncludes "attack" == 1 && MyRef.AnimPathIncludes "cast" == 0
if MyRef.AnimPathIncludes "attack" == 1 && MyRef.AnimPathIncludes "cast" == 0
message"I am attacking but not casting!"
message"I am attacking but not casting!"
endif
endif



Revision as of 17:18, 29 May 2011


A command for Oblivion Script Extender

Syntax:

(IsAttacking:bool) actor:ref.IsAttacking

Returns 1 if the calling actor is attacking.

Notes

  • Will return 1 while the player is attacking, sometimes even longer than IsCasting. Thus this will not work:

if MyRef.isattacking == 1 && MyRef.iscasting == 0

message"I am attacking but not casting!"

endif

Use this instead:

if MyRef.AnimPathIncludes "attack" == 1 && MyRef.AnimPathIncludes "cast" == 0

message"I am attacking but not casting!"

endif

See Also