BSL:Tutorial/Console: Difference between revisions

m
replaced laziness with a useful link
(rewrote/completed the tutorial)
m (replaced laziness with a useful link)
 
(3 intermediate revisions by the same user not shown)
Line 15: Line 15:
|}
|}


"A_t48" is the name of the very first enemy that you encounter in Oni: a "thug" patrolling the first room in the Syndicate Warehouse. This exercise is going to find a new purpose for him. Load the first save point in Chapter 1.
"A_t48" is the name of the very first enemy that you encounter in Oni: a [[Thug]] patrolling the first room in the Syndicate Warehouse. This exercise is going to find a new purpose for him. Load the first save point in Chapter 1.


First, we are going to stay in this room and study him. We do '''not''' want to fight him. So you should make yourself invisible with the '''moonshadow''' cheat. Now he can't see us. If we don't want him to hear us, either, we can creep.
First, we are going to stay in this room and study him. We do '''not''' want to fight him. So you should make yourself invisible with the '''moonshadow''' cheat. Now he can't see us. If we don't want him to hear us, either, we can creep.
Line 34: Line 34:
----
----
{|style="float:right"
{|style="float:right"
|+<tt>'''A_t48'''</tt>
|+<tt>'''char_0'''</tt>
|[[Image:Konoko 1.gif]]
|[[Image:Konoko 1.gif]]
|}
|}
Line 43: Line 43:
You will see name tags appear both above "A_t48" and Konoko ("char_0"). These are their scripting names.
You will see name tags appear both above "A_t48" and Konoko ("char_0"). These are their scripting names.
----
----
Now, we are going to give him a weapon, the Van de Graaff pistol (stun gun).
Now, we are going to give him a weapon, the Van de Graaff pistol (stun gun). You can obtain the scripting names of weapons from [[BSL:Inventory management#Weapons|HERE]].


  CMD: chr_giveweapon A_t48 w6_vdg
  CMD: chr_giveweapon A_t48 w6_vdg
Line 63: Line 63:
  CMD: chr_changeteam A_t48 Konoko
  CMD: chr_changeteam A_t48 Konoko


This function takes the name of a character and a team to place them on; the choices are Konoko, TCTF, Syndicate, Neutral, SecurityGuard, RogueKonoko, Switzerland, SyndicateAccessory, which are explained elsewhere on the wiki. You can now make yourself visible again by turning off the "moonshadow" cheat and the Comguy will not attack you when he sees you. Let's also allow AIs to hear again:
This function takes the name of a character and a team to place them on; the choices are Konoko, TCTF, Syndicate, Neutral, SecurityGuard, RogueKonoko, Switzerland, SyndicateAccessory, which are explained [[OBD talk:BINA/OBJC/CHAR#Teams|here]]. You can now make yourself visible again by turning off the "moonshadow" cheat and the Comguy will not attack you when he sees you. Let's also allow AIs to hear again:


  CMD: ai2_deaf=0
  CMD: ai2_deaf=0
Line 86: Line 86:
This is just a sampling of the power that BSL gives you. There are over 500 built-in variables and functions in Oni. You can find a full list of them at [[BSL:Functions]] and [[BSL:Variables]].
This is just a sampling of the power that BSL gives you. There are over 500 built-in variables and functions in Oni. You can find a full list of them at [[BSL:Functions]] and [[BSL:Variables]].


P.S.: Note that there are some things you can't do on the console that are essential to scripting, such as declaring a function. The later tutorials will show how to write complete scripts in .bsl files.
P.S.: Note that there are some things you can't do on the console that are essential to scripting, such as declaring a function. The [[../Scratch|next tutorial]] will show how to write complete scripts in .bsl files.


[[Category:Modding tutorials]]
[[Category:Modding tutorials]]