BSL talk:Functions
Jump to navigation
Jump to search
- geyser, is this about what you wanted?
- I have to do it over again, as I screwed a few things up...
- How do you leave a box empty? Just put a space in?
- Also, the types need listing...
- The Mystery Man ^_^
- Dear sir. Either log in or sign, preferably both.
- I'd prefer if signatures were listed in a tidier way.
- (I mean function signatures, not people's sigs ^_^)
- There is currently an example table in the sandbox.
- I wouldn't give one-line examples in such a table...
- Instead, I'd provide console-powered mini-tutorials.
- For example, see what I put here: ai2_allpassive.
- Such a mini-tut is more flexible than a table cell.
- And we'll be basically building a tutorial as we go.
- geyser 03:03, 22 January 2008 (CET)
Type | Name | Arguments | Description | Example | |
---|---|---|---|---|---|
X | ai2_active | script_id:int] | forces an AI into active mode | ||
X | ai2_attack | script_id:int] [target_name:string | target_script_id:int] | forces an AI to attack another character | ai2_attack IntroNinja 0 | |
X | ai2_barabbas_retrievegun | script_id:int] | makes barabbas retrieve his gun if it is lost | ai2_barabbas_retrievegun barabus | |
X | ai2_barabbas_run | lets Barabbas run while carrying his gun | |||
X | ai2_chump (null) | creates a chump | |||
X | ai2_chump_stop | stops the chump | |||
X | ai2_comehere | script_id:int] | tells an AI to come to the player | ||
X | ai2_doalarm | script_id:int] [console_id:int] | tells an AI to run for an alarm | ai2_doalarm ambush_commguy_2 4
if the AI is passive, ai2_doalarm cannot be executed | |
X | ai2_dopath | script_id:int] path_name:string | tells an AI to run a particular path | ai2_dopath A_E3 patrol_49
if the AI is passive, ai2_dopath cannot be executed | |
X | ai2_followme | script_id:int] | tells an AI to follow the player | ai2_followme s2_t05 | |
X | ai2_forget | script_id:int] [forget_char:string] | makes one or all AIs forget they saw anything | ai2_forget Sec_Ambush_BOL_1 | |
X | ai2_idle | script_id:int] | tells an AI to become idle | ai2_idle A1_intro01 | |
X | ai2_inactive | script_id:int] | forces an AI into inactive mode | ||
X | ai2_kill | [param1:string] [param2:string] | kills one or more AIs | ai2_kill ScanKerr01 // ai2_kill | |
X | ai2_lookatchar | script_id:int] [ai_name:string | script_id:int] | tells an AI to look at a character | ai2_lookatchar 0 Barabus
needs ai2_takecontrol 1 if Konoko should do that | |
X | ai2_lookatme | script_id:int] | tells an AI to look at the player | ai2_lookatme s2_t05 | |
X | ai2_makeaware | script_id:int] [target_name:string | target_script_id:int] | makes an AI aware of another character | ai2_makeaware GrifElite04 char_0 | |
X | ai2_makeblind | script_id:int] on_off:int{0 | 1} | makes a single AI blind | ai2_makeblind ShinShin 1 | |
X | ai2_makedeaf | script_id:int] on_off:int{0 | 1} | makes a single AI deaf | ai2_makedeaf ShinShin 1 | |
X | ai2_makeignoreplayer | script_id:int] on_off:int{0 | 1} | makes a single AI ignore the player | ai2_makeignoreplayer ParkStriker 1 | |
X | ai2_movetoflag | script_id:int] flag_id:int [setfacing:string{"setfacing"}] | tells an AI to move to a flag | ai2_movetoflag 0 1091
needs ai2_takecontrol 1 if Konoko should do that | |
X | ai2_neutralbehavior | script_id:int] behavior:string | sets up an AI's neutral-interaction | ai2_neutralbehavior neutral_3 none | |
X | ai2_noncombatant | script_id:int] non_combatant:int{0 | 1} | sets or clears an AI's non-combatant state | ai2_noncombatant A1_intro01 1 | |
X | ai2_panic | script_id:int] timer:int | makes an AI panic or not panic | ai2_panic A1_s_red02 300
I've tried ai2_panic A1_s_red02 300 ==> Oni crashed | |
X | ai2_passive | script_id:int] passive:int{0 | 1} | stops an AI from thinking for itself | ai2_passive Intro_Striker_4 1 | |
X | ai2_reset | [reset_player:int] | resets AI as if start of level | ai2_reset | |
X | ai2_setalert | script_id:int] alert:string | sets the alert state of an AI | ai2_setalert Floor2_Striker_2 high (alert strings: lull, low, medium, high, combat) | |
X | ai2_setjobstate | script_id:int] | tells an AI to take its current state as its job | ai2_setjobstate E_Er34
if the AI is passive, ai2_setjobstate cannot be executed | |
X | ai2_setmovementmode | script_id:int] mode:string | sets an AI's current movement mode | ai2_setmovementmode finalam_striker_1 walk (movement mode strings: creep, walk, walk_noaim, run, run_noaim)
needs ai2_takecontrol 1 if Konoko should do that | |
X | ai2_spawn | ai_name:string [force_spawn:string{"force"}] | creates and starts an AI from a character object | ai2_spawn ambush_striker_2 | |
X | ai2_tripalarm | script_id:int] | trips an alarm | ai2_tripalarm 2 0 |
- Where is chr_main_class and chr_set_class? Don't they belong on the BSL function page? EdT 22:14, 24 October 2008 (CEST)
- chr_teleport [ai_name:string | script_id:int] flag_id:int - teleports a character to a flag - chr_teleport 0 105
- Tried tomorrow it with -1, chr_teleport -1 400, which seems to give random results, but always retreives a spawned character, I tought it would always retreive the first character alive after Konoko but seems it isn't always the case. Have anyone had also a look a this? If it was a underflow probably it shouldn't retreive characters most of the time. --Script 10k 12:55, 8 August 2012 (CEST)