BSL:AI activity: Difference between revisions

using template for table header
m (groups of commands need to be put in an ad-hoc table if you want to place them side by side so that they don't take up a bunch of vertical space)
(using template for table header)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
Commands for controlling the activity of AIs.
Commands for controlling the activity of AIs.
 
{{TOCfloat}}
{| class="wikitable"
{| {{BSL Group Table Header}}<onlyinclude>{{BSL Group Table|{{PAGENAME}}}}</onlyinclude>
!Group
!Kind
!Type
!Name
!Platform<onlyinclude>{{BSL Group Table|{{PAGENAME}}}}</onlyinclude>
|}
|}


==Active status==
{|
{|
|-
|-
|{{:ai2_active}}
|{{:ai2_active}}
|{{:ai2_inactive}}
|{{:ai2_inactive}}
|}
{|
|-
|-
|{{:chr_all_active}}
|{{:chr_all_active}}
|{{:chr_draw_all_characters}}
|{{:chr_draw_all_characters}}
|{{:chr_disable_visactive}}
|{{:chr_disable_visactive}}
|}
{|
|-
|-
|{{:chr_lock_active}}
|{{:chr_lock_active}}
Line 23: Line 23:
Active characters are ones that can be collided with, attacked, etc. An active character can be passive or not passive (see next commands). It is normal for characters to become inactive when they have not been drawn (i.e., have not been on-screen) for a while. Thus, using '''chr_all_active''' or '''chr_draw_all_characters''' to force all characters to be evaluated as active is an unusual measure that is not to be taken lightly. Those two variables might in fact only have been useful for Oni's developers. Set '''chr_disable_visactive''' to true to avoid making characters active simply because they are being drawn. '''chr_lock_active''' obviously prevents a character from automatically going inactive, and '''chr_unlock_active''' removes the lock.
Active characters are ones that can be collided with, attacked, etc. An active character can be passive or not passive (see next commands). It is normal for characters to become inactive when they have not been drawn (i.e., have not been on-screen) for a while. Thus, using '''chr_all_active''' or '''chr_draw_all_characters''' to force all characters to be evaluated as active is an unusual measure that is not to be taken lightly. Those two variables might in fact only have been useful for Oni's developers. Set '''chr_disable_visactive''' to true to avoid making characters active simply because they are being drawn. '''chr_lock_active''' obviously prevents a character from automatically going inactive, and '''chr_unlock_active''' removes the lock.


==Passive status==
{|
{|
|-
|-
|{{:ai2_allpassive}}
|{{:ai2_allpassive}}
|{{:ai2_passive}}
|{{:ai2_passive}}
|}
{|
|-
|-
|{{:chr_freeze}}
|{{:chr_freeze}}
Line 32: Line 35:
|}
|}


When these functions are passed "true" or a non-zero number for "passive", the specified AI (or all AIs, with '''ai2_allpassive''') will stop all "intelligent" activity (melee, gunfights, pursuit), but passive AIs will still patrol. Since the default value for "passive" is 0, you don't need to pass anything for that argument to make an AI active again; i.e., '''ai2_allpassive()''' makes all AIs active. '''chr_freeze''' and '''chr_neutral''' are simply aliases for '''ai2_passive'''.
Passive is not the opposite of active (see above). Even when passive, an AI can still be active. However, when these functions are passed "true" for "passive", the specified AI (or all AIs, with '''ai2_allpassive''') will stop all "intelligent" activity (melee, gunfights, pursuit), but passive AIs will still patrol. Since the default value for "passive" is 0, you don't need to pass anything for that argument to make an AI non-passive again; i.e., "ai2_allpassive();" turns off passiveness for all AIs. '''chr_freeze''' and '''chr_neutral''' are simply aliases for '''ai2_passive'''.
 
{{:ai2_idle}}
 
Clears an AI's goals, whether they are in pursuit mode, seeking an alarm, panicking, etc.
 


==Alert status==
{{:ai2_setalert}}
{{:ai2_setalert}}


Set AI's [[AI#Reactions and awareness|alert level]]. The argument "alert" can be "lull", "low", "medium", "high", "combat".
Set AI's [[AI#Reactions and awareness|alert level]]. The argument "alert" can be "lull", "low", "medium", "high", "combat".


{{:chr_peace}}
{{:chr_peace}}