Difference between revisions of "OnAlarm"
Jump to navigation
Jump to search
imported>JOG (Moved to "Category: Blocktypes") |
imported>Quetzilla |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
'''Syntax:''' | '''Syntax:''' | ||
begin OnAlarm CrimeType, Criminal | begin OnAlarm CrimeType, ''Criminal'' | ||
'''Example:''' | '''Example:''' | ||
begin OnAlarm 0 | begin OnAlarm 0 | ||
Line 8: | Line 8: | ||
==See Also== | ==See Also== | ||
[[Crime Types]] | *[[Crime Types]] | ||
[[OnAlarmVictim]] | *[[OnAlarmVictim]] | ||
[[Category: Blocktypes]] | [[Category: Blocktypes]] |
Latest revision as of 23:35, 28 May 2008
Syntax:
begin OnAlarm CrimeType, Criminal
Example:
begin OnAlarm 0 begin OnAlarm 3, player
This block will be run once when the scripted actor receives an alarm of the specified crime type committed by Criminal (actorID). If only crime type is specified, this block will be run whenever the scripted actor receives any alarm for the given crime type. If more information about the crime is needed, GetCrimeKnown can be used inside the OnAlarm block to determine if a particular criminal/victim combination has occurred.