Difference between revisions of "OnHit"
Jump to navigation
Jump to search
imported>Ecaponi |
imported>Quetzilla m |
||
(12 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
'''Syntax:''' | '''Syntax:''' | ||
begin OnHit ''ActorID | begin OnHit ''ActorID'' | ||
'''Example:''' | '''Example:''' | ||
begin OnHit BaurusRef | begin OnHit BaurusRef | ||
This block will be run once when the scripted actor is hit by the specified ActorID. If no parameter is used, the block will | This block will be run once when the scripted actor is hit by the specified ActorID. If no parameter is used, the block will run when the scripted actor is hit by anyone. | ||
[[Category: | == Notes== | ||
*Using [[GetDetected]] in an OnHit block doesn't really work. The OnHit block happens just AFTER the hit occurs, and the way Actor detection works, the hit causes an immediate awareness spike and so GetDetected will always come up as true. It will NOT return whether the Actor was detected previous to the hit. | |||
*Only works on NPCs and Creatures, and will not work on items. | |||
==See Also== | |||
*[[OnHitWith]] | |||
[[Category: Blocktypes]] |
Latest revision as of 23:37, 28 May 2008
Syntax:
begin OnHit ActorID
Example:
begin OnHit BaurusRef
This block will be run once when the scripted actor is hit by the specified ActorID. If no parameter is used, the block will run when the scripted actor is hit by anyone.
Notes[edit | edit source]
- Using GetDetected in an OnHit block doesn't really work. The OnHit block happens just AFTER the hit occurs, and the way Actor detection works, the hit causes an immediate awareness spike and so GetDetected will always come up as true. It will NOT return whether the Actor was detected previous to the hit.
- Only works on NPCs and Creatures, and will not work on items.