BSL:BFW Scripting Language: Difference between revisions

m
why not a "code pieces" section - why inventing same things over and over
m (+cat)
m (why not a "code pieces" section - why inventing same things over and over)
Line 118: Line 118:
|}
|}
|}
|}
==Code pieces==
# and old but useful character setup function by geyser
func '''SpawnNameFlagHealthReset'''(string n, int f, int h, int r){
    ai2_spawn(n); chr_teleport(n, f)
    if(h) chr_set_health(n, h)
    if(r) chr_inv_reset(n)
}
# can be like this ...
func wave_setup {
    #note that missing arguments are taken to be 0)
    SpawnNameFlagHealthReset Griffin 23 600
    SpawnNameFlagHealthReset Muro 22 2500
    SpawnNameFlagHealthReset F_Er89 22 80 1
    SpawnNameFlagHealthReset A_S1 24
}


[[Category:Bungie scripting language docs]]
[[Category:Bungie scripting language docs]]
8,245

edits