// healthtables parameters: local.origin local.angles local.healthinverted // example: exec maps/obj_medicstuff/healthtables.scr::main ( 10 -10 100 ) 180 1 // local.angles = avoid using angles that are not +-90 degrees: (example: 0, 90, -90, 180, -270...) // // if local.angles is along x-axis (0,180), then align health items along x-axis // if local.angles is along y-axis (90,270), then align health items along y-axis // local.healthinverted = 0 for health packs placed on table from left to right: 100 - 50 - 25. // local.healthinverted = 1 for health packs placed on table from left to right: 25 - 50 - 100. main local.origin local.angles local.healthinverted: local.axishealthtable = spawn script_model local.axishealthtable model static/bunkertable.tik local.axishealthtable.origin = local.origin local.axishealthtable.angles = ( 0 local.angles 0 ) if(local.angles == 0 || local.angles == 180) { if(local.healthinverted == 0) { local.healthbox1 = spawn items/item_25_healthbox.tik local.healthbox1.origin = local.axishealthtable.origin + ( 10 25 52 ) local.healthbox1.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox2 = spawn items/item_25_healthbox.tik local.healthbox2.origin = local.axishealthtable.origin + ( -10 25 52 ) local.healthbox2.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox3 = spawn items/item_50_healthbox.tik local.healthbox3.origin = local.axishealthtable.origin + ( 10 0 52 ) local.healthbox3.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox4 = spawn items/item_50_healthbox.tik local.healthbox4.origin = local.axishealthtable.origin + ( -10 0 52 ) local.healthbox4.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox5 = spawn items/item_100_healthbox.tik local.healthbox5.origin = local.axishealthtable.origin + ( 10 -25 52 ) local.healthbox5.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox6 = spawn items/item_100_healthbox.tik local.healthbox6.origin = local.axishealthtable.origin + ( -10 -25 52 ) local.healthbox6.angles = local.axishealthtable.angles + ( 0 180 0 ) } if(local.healthinverted == 1) { local.healthbox1 = spawn items/item_25_healthbox.tik local.healthbox1.origin = local.axishealthtable.origin + ( 10 -25 52 ) local.healthbox1.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox2 = spawn items/item_25_healthbox.tik local.healthbox2.origin = local.axishealthtable.origin + ( -10 -25 52 ) local.healthbox2.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox3 = spawn items/item_50_healthbox.tik local.healthbox3.origin = local.axishealthtable.origin + ( 10 0 52 ) local.healthbox3.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox4 = spawn items/item_50_healthbox.tik local.healthbox4.origin = local.axishealthtable.origin + ( -10 0 52 ) local.healthbox4.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox5 = spawn items/item_100_healthbox.tik local.healthbox5.origin = local.axishealthtable.origin + ( 10 25 52 ) local.healthbox5.angles = local.axishealthtable.angles + ( 0 180 0 ) local.healthbox6 = spawn items/item_100_healthbox.tik local.healthbox6.origin = local.axishealthtable.origin + ( -10 25 52 ) local.healthbox6.angles = local.axishealthtable.angles + ( 0 180 0 ) } } if(local.angles == 90 || local.angles == -90 || local.angles == 270 || local.angles == -270 ) { if(local.healthinverted == 0) { local.healthbox1 = spawn items/item_25_healthbox.tik local.healthbox1.origin = local.axishealthtable.origin + ( 25 10 52 ) local.healthbox1.angles = local.axishealthtable.angles local.healthbox2 = spawn items/item_25_healthbox.tik local.healthbox2.origin = local.axishealthtable.origin + ( 25 -10 52 ) local.healthbox2.angles = local.axishealthtable.angles local.healthbox3 = spawn items/item_50_healthbox.tik local.healthbox3.origin = local.axishealthtable.origin + ( 0 10 52 ) local.healthbox3.angles = local.axishealthtable.angles local.healthbox4 = spawn items/item_50_healthbox.tik local.healthbox4.origin = local.axishealthtable.origin + ( 0 -10 52 ) local.healthbox4.angles = local.axishealthtable.angles local.healthbox5 = spawn items/item_100_healthbox.tik local.healthbox5.origin = local.axishealthtable.origin + ( -25 10 52 ) local.healthbox5.angles = local.axishealthtable.angles local.healthbox6 = spawn items/item_100_healthbox.tik local.healthbox6.origin = local.axishealthtable.origin + ( -25 -10 52 ) local.healthbox6.angles = local.axishealthtable.angles } if(local.healthinverted == 1) { local.healthbox1 = spawn items/item_25_healthbox.tik local.healthbox1.origin = local.axishealthtable.origin + ( -25 10 52 ) local.healthbox1.angles = local.axishealthtable.angles local.healthbox2 = spawn items/item_25_healthbox.tik local.healthbox2.origin = local.axishealthtable.origin + ( -25 -10 52 ) local.healthbox2.angles = local.axishealthtable.angles local.healthbox3 = spawn items/item_50_healthbox.tik local.healthbox3.origin = local.axishealthtable.origin + ( 0 10 52 ) local.healthbox3.angles = local.axishealthtable.angles local.healthbox4 = spawn items/item_50_healthbox.tik local.healthbox4.origin = local.axishealthtable.origin + ( 0 -10 52 ) local.healthbox4.angles = local.axishealthtable.angles local.healthbox5 = spawn items/item_100_healthbox.tik local.healthbox5.origin = local.axishealthtable.origin + ( 25 10 52 ) local.healthbox5.angles = local.axishealthtable.angles local.healthbox6 = spawn items/item_100_healthbox.tik local.healthbox6.origin = local.axishealthtable.origin + ( 25 -10 52 ) local.healthbox6.angles = local.axishealthtable.angles } } /* else if((local.healthinverted != 0 && local.healthinverted != 1) || local.healthinverted == NULL) { wait 3 iprintlnbold "ERROR. exec healthtables.scr is missing a parameter: local.healthinverted = 0 or 1." iprintlnbold "Example: exec maps/obj_medicstuff/healthtables.scr::main ( 10 -250 100 ) 180 1" } */ end