BSL:AI activity: Difference between revisions
(we can do away with the Group column on grouped pages and still have it on BSL:List) |
(centering and titling command table; forcing TOC on to try to fill more of that upper space; fixing phrasing of "Passive" section) |
||
Line 1: | Line 1: | ||
Commands for controlling the activity of AIs. | Commands for controlling the activity of AIs. | ||
{{TOCfloat}} | |||
{| class="wikitable" | {| class="wikitable" style="margin-left:auto; margin-right:auto;" | ||
|+Contents | |||
!Kind | !Kind | ||
!Type | !Type | ||
Line 39: | Line 40: | ||
|} | |} | ||
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'''. | |||
==Alert status== | ==Alert status== |
Revision as of 14:27, 21 December 2015
Commands for controlling the activity of AIs.
Kind | Type | Name | Platform |
---|---|---|---|
void | ai2_active | | |
void | ai2_allpassive | | |
void | ai2_inactive | | |
void | ai2_passive | | |
void | ai2_setalert | | |
bool | chr_all_active | | |
bool | chr_disable_visactive | | |
bool | chr_draw_all_characters | | |
void | chr_freeze | | |
void | chr_lock_active | | |
void | chr_neutral | | |
void | chr_peace | | |
void | chr_unlock_active |
Active status
|
|
bool chr_all_active |
|
|
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
|
|
|
|
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.
Alert status
void |
string or int |
string |
|
ai2_setalert( |
ai_name or script_id, |
alert |
); |
default: -- |
-- |
-- |
Set AI's alert level. The argument "alert" can be "lull", "low", "medium", "high", "combat".
void |
string or int |
|
chr_peace( |
ai_name or script_id |
); |
default: -- |
-- |
Turns off fighting animation pose (used in cutscenes).