PDA

View Full Version : Need help with BSP Switching script



tylerp14
February 7th, 2011, 09:26 PM
So, the script below should work, but i dont have a "bsp 1" in the map? I want to change the bsp from day/night by killing the biped "biped1". Can Somebody help?

(script continuous switching
(if (= (unit_get_health biped1) 0)
(begin
(switch_bsp bsp 1)
)
)
)
(script continuous sync_part
(if (= (unit_get_health biped1) 0)
(begin
(object_create_anew biped1)
(sleep 30)
)
)
)

Dwood
February 7th, 2011, 09:50 PM
(switch_bsp bsp 1) <- Remove bsp 1 and use the index of that bsp in the map. You can find it out based on the number given for that bsp in the scenario file.

tylerp14
February 7th, 2011, 10:01 PM
Ok, so in Guerilla under Stucture Bsps? How do I save a structure bsp so I can find it in Guerilla? Do I make the sky night then save the .scenario?

leorimolo
February 8th, 2011, 09:24 AM
(= (structure_bsp_index) 2)
Index is just the number under which your bsp is in the scnr. Here its loading the second bsp.

tylerp14
February 8th, 2011, 01:28 PM
... I still I need help... Oh and after I compile the map it exeptions when I go to test it in CE, Any Idea how to fix this?


ODST_Nick: Theres too many BSPS.
Jedi: So...Do I Erase .scenario's? Or maps to fix it?
ODST_Nick: Structure BSPs and skies. one of each.

But I only have 1 sky in the map and 1 Structure BSP. How do I fix this to?

Higuy
February 8th, 2011, 07:06 PM
To create a "bsp 1", you need to duplicate your old sbsp and add it into the scenario. Once you've done that, run the lightmaps for that specific bsp. Then the script will work just fine.