BSL:Tutorial/Scratch: Difference between revisions

m
Line 191: Line 191:
===Overpower===
===Overpower===


Use the <tt>chr_set_health</tt> command to set a character's health. Note that each character has a base health that may not be the same. For example, konoko's base health is 200, while a brown striker's is only 50. Keep this in mind when setting character's health. Setting it over their base health will send them into overpower - like using a hypo at full health. The health will drain at 1 every second even for AI. This example sets konoko's health to 400 - overpower.
Use the <tt>chr_set_health</tt> command to set a character's health. Note that each character has a base health that may not be the same. For example, konoko's base health is 200, while a brown striker's is only 50. Keep this in mind when setting character's health. Setting it over their base health will send them into overpower - like using a hypo at full health. The health will drain at 1 every second even for AI.
 
*Attention! Attention! If ''that'' was true, Konoko's overpower would last 200 seconds : over 3 minutes. Which it doesn't.
<tt>chr_set_health 0 400</tt>
This example sets konoko's health to 400 - overpower.
chr_set_health 0 400




This following example shows everything listed above added.
This following example shows everything listed above added.
 
func void main(void) {
<tt>func void main(void)<br>
    chr_teleport 0 7010
{<br>
    powerup_spawn hypo 7010
<br>
chr_teleport 0 7010<br>
    ai2_spawn Top_Striker_1
powerup_spawn hypo 7010<br>
    ai2_spawn Top_Comguy_1
<br>
ai2_spawn Top_Striker<br>
    chr_teleport Top_Striker_1 7008
ai2_spawn Top_Comguy<br>
    chr_teleport Top_Comguy_1 7009
<br>
chr_teleport Top_Striker 7008<br>
    chr_givepowerup Top_Striker_1 invis -1
chr_teleport Top_Comguy 7009<br>
    chr_givepowerup Top_Comguy_1 invis -1
<br>
    powerup_spawn invis 7007
chr_givepowerup Top_Striker invis -1<br>
    powerup_spawn invis 7009
chr_givepowerup Top_Comguy invis -1<br>
powerup_spawn invis 7007<br>
    chr_giveweapon Top_Striker_1 w7_scc
powerup_spawn invis 7009<br>
    chr_giveweapon Top_Comguy_1 w3_phr
<br>
    chr_givepowerup Top_Striker_1 ammo 15
chr_giveweapon Top_Striker w7_scc<br>
    chr_givepowerup Top_Comguy_1 cell 30
chr_giveweapon Top_Comguy w3_phr<br>
chr_givepowerup Top_Striker ammo 15<br>
    weapon_spawn w2_sap 7045
chr_givepowerup Top_Comguy cell 30<br>
    powerup_spawn ammo 7008
<br>
weapon_spawn w2_sap 7045<br>
    ai2_spawn OutroTCTF01
powerup_spawn ammo 7008<br>
    chr_teleport OutroTCTF01 7007
<br>
ai2_spawn OutroTCTF01<br>
    ai2_spawn WH_Thug_A
chr_teleport OutroTCTF01 7007<br>
    chr_changeteam WH_Thug_A TCTF
<br>
    chr_teleport WH_Thug_A 7007
ai2_spawn WH_Thug_A<br>
chr_changeteam WH_Thug_A TCTF<br>
    ai2_spawn griffin
chr_teleport WH_Thug_A 7007<br>
    chr_changeteam griffin Syndicate
<br>
    chr_teleport griffin 7008
ai2_spawn griffin<br>
    chr_set_health griffin 3900
chr_changeteam griffin Syndicate<br>
}
chr_teleport griffin 7008<br>
chr_set_health griffin 3900<br>
}</tt>