BSL:Tutorial/Scratch: Difference between revisions

Line 116: Line 116:
}</tt>
}</tt>


After the function call <tt>chr_teleport 0 7010</tt>, add the following 2 function calls on separate lines: <tt>ai2_spawn Top_Striker</tt> and <tt>ai2_spawn Top_Comguy</tt>. These two function calls tell the game to create 2 characters: Top_Striker, and Top_Comguy.
After the function call <tt>chr_teleport 0 7010</tt>, add the following 2 commands on separate lines: <tt>ai2_spawn Top_Striker</tt> and <tt>ai2_spawn Top_Comguy</tt>. These two commands tell the game to create 2 characters: Top_Striker, and Top_Comguy.


Since that these characters do not spawn in the room, they must be teleported there. Using the <tt>chr_teleport</tt> function call used earlier to teleport yourself, modify it to teleport the 2 AI using their names instead of "0". Teleport them to the flags "7008" and "7009" respectively. Refer to the example above or the list of function calls above to write this in.
Since that these characters do not spawn in the room, they must be teleported there. Using the <tt>chr_teleport</tt> command used earlier to teleport yourself, modify it to teleport the 2 AI using their names instead of "0". Teleport them to the flags "7008" and "7009" respectively. Refer to the example above or the list of function calls above to write this in.


It should now look like this :
It should now look like this :
Line 134: Line 134:


This fight too easy? In the next section, we will learn how to spice up the fight, and let you develop your own script.
This fight too easy? In the next section, we will learn how to spice up the fight, and let you develop your own script.
----
== Part 6: Customization==
Here, you will be able to split off and customize your script.
Each subsection will represent a way to customize the above script.
===Weapons and Powerups===
These are the easiest things to add into a battle.
Weapons can be spawned on the ground or given to characters.
====Giving Characters Weapons====
Giving characters weapons is very easy. Simply use the command <tt>chr_giveweapon</tt> to give a character a weapon.
[[OSL: Weapon Codes|Here]] are the list of the weapon codes. For the purpose of this example, we will use <tt>w3_phr</tt>, the plasma rifle. This command will give the two strikers plasma rifles.
Add the commands <tt>chr_giveweapon Top_Striker w3_phr</tt> and <tt>chr_giveweapon Top_Comguy w3_phr</tt> on separate lines beneath what you have already. Be sure to add it ''BEFORE'' the '''}''' or it will not execute.
====Spawning Weapons on the ground====
Spawning weapons is simple. Use the command <tt>weapon_spawn</tt> to spawn a weapon.
Add the commands <tt>weapon_spawn w3_phr 7008</tt> and <tt>weapon_spawn w3_phr 7009</tt> on separate lines beneath what you have already. Be sure to add it ''BEFORE'' the '''}''' or it will not execute. This command will spawn 2 plasma rifles, one under each striker's feet. AI will automatically pick up weapons with ammo or empty weapons they have ammo for.
====Giving Characters Powerups====
Giving characters powerups is much like giving characters weapons. Use the command <tt>chr_givepowerup</tt> to give a character a powerup.
The powerups you can give a character are :
* shield : Gives a force shield
* invis : Gives a phase cloak
* ammo : Gives a ballistic ammo
* cell : Gives an energy cell.
For the purpose of this example, we will give the characters invisibilities.
Add the commands <tt>chr_givepowerup Top_Striker invis -1</tt> and <tt>chr_givepowerup Top_Comguy invis -1</tt> on separate lines beneath what you have already. Be sure to add it ''BEFORE'' the '''}''' or it will not execute. This command will make the strikers permanently invisible. To make then visible after 30 seconds, erase "-1".
====Spawning Powerups on the Ground====
Spawning powerups are simple. Use the command <tt>powerup_spawn</tt> to spawn a powerup.
Add the commands <tt>powerup_spawn invis 7008</tt> and <tt>powerup_spawn invis 7009</tt> on separate lines beneath what you have already. Be sure to add it ''BEFORE'' the '''}''' or it will not execute. This command will spawn 2 phase cloaks beneath the striker's feet. Since AI  will not pick up powerups, this is for you only.
===Extra Characters===
Addubg extra characters to the script is easy. Just follow the steps for adding the first AI and follow the procedure, look for AI names [[OSL: AI names|Here]].
====Adding Enemies====
Look at the chart for what teams the AI are on. Most of the time, adding enemies simply involve spawning and teleporting the AI. As long as the team in "Syndicate", it will be an enemy.
====Adding Allies====
Look at the chart for what teams the AI are on. As long as the team is "TCTF" or "Konoko", it will be an ally for you in this script. If you want to add an ally from the enemy team, use the <tt>chr_changeteam</tt> command to changet their team to "TCTF" or "Konoko" like this:
<tt>chr_changeteam WH_Striker_D TCTF</tt>
.
.
.
More on the way!








Why isn't it in the OSL namespace???[[User:Geyser|geyser]] 06:04, 15 Nov 2005 (CET)
Changed (?)
                                                               - Your_Mom
                                                               - Your_Mom
85

edits