I will make a video either tonight, or tomorrow!
Awesome! What's your YouTube channel?
Double Post Merge: October 09, 2016, 03:01:45 pm
Go to your map gsc file under your map's scripts folder and than under function main add than copy and paste this to the bottom of your gsc script
function init_power()
{
level flag::wait_till("power_on");
level util::set_lighting_state(3);
}
Change the lighting state number to the lighting state of the lights on mode. (Note: Some people are having a glitch where the script lighting state number does not match with the radiant editor lighting sate numbers for some reason for example lighting state 3 in the script is lighting state 2 in radiant. I recomend you play around with the lighting state number in level util::set_lighting_state(statenumberhere)
Big thanks to Author for teaching me on discord!
Man, I tried EVERYTHING and the lights won't turn on with the power!
I tried changing the lighting state, creating a new map, changing it's position in the .gsc, nothing will work man..
Is there something im missing?
Heres my .gsc
#using scripts\codescripts\struct;
#using scripts\zm\sliding_door;
#using scripts\shared\array_shared;
#using scripts\shared\callbacks_shared;
#using scripts\shared\clientfield_shared;
#using scripts\shared\compass;
#using scripts\shared\exploder_shared;
#using scripts\shared\flag_shared;
#using scripts\shared\laststand_shared;
#using scripts\shared\math_shared;
#using scripts\shared\scene_shared;
#using scripts\shared\util_shared;
#insert scripts\shared\shared.gsh;
#insert scripts\shared\version.gsh;
#insert scripts\zm\_zm_utility.gsh;
#using scripts\zm\_load;
#using scripts\zm\_zm;
#using scripts\zm\_zm_audio;
#using scripts\zm\_zm_powerups;
#using scripts\zm\_zm_utility;
#using scripts\zm\_zm_weapons;
#using scripts\zm\_zm_zonemgr;
#using scripts\shared\ai\zombie_utility;
//Custom
#using scripts\zm\zm_claymore;
//Perks
#using scripts\zm\_zm_pack_a_punch;
#using scripts\zm\_zm_pack_a_punch_util;
#using scripts\zm\_zm_perk_additionalprimaryweapon;
#using scripts\zm\_zm_perk_doubletap2;
#using scripts\zm\_zm_perk_deadshot;
#using scripts\zm\_zm_perk_juggernaut;
#using scripts\zm\_zm_perk_quick_revive;
#using scripts\zm\_zm_perk_sleight_of_hand;
#using scripts\zm\_zm_perk_staminup;
#using scripts\zm\_zm_perk_widows_wine;
//Powerups
#using scripts\zm\_zm_powerup_double_points;
#using scripts\zm\_zm_powerup_carpenter;
#using scripts\zm\_zm_powerup_fire_sale;
#using scripts\zm\_zm_powerup_free_perk;
#using scripts\zm\_zm_powerup_full_ammo;
#using scripts\zm\_zm_powerup_insta_kill;
#using scripts\zm\_zm_powerup_nuke;
//#using scripts\zm\_zm_powerup_weapon_minigun;
//Traps
#using scripts\zm\_zm_trap_electric;
#using scripts\zm\zm_usermap;
//*****************************************************************************
// MAIN
//*****************************************************************************
function main()
{
thread init_power();
level.dog_rounds_allowed = false;
zm_usermap::main();
startingWeapon = "pistol_burst";
weapon = getWeapon(startingWeapon);
level.start_weapon = (weapon);
level.perk_purchase_limit = 9;
level.player_starting_points = 0;
level.zombie_ai_limit = 36;
level._zombie_custom_add_weapons =&custom_add_weapons;
level.pack_a_punch_camo_index = 75;
level.pack_a_punch_camo_index_number_variants = 5;
//Setup the levels Zombie Zone Volumes
level.zones = [];
level.zone_manager_init_func =&usermap_test_zone_init;
init_zones[0] = "start_zone";
level thread zm_zonemgr::manage_zones( init_zones );
//Custom
thread zm_claymore::init();
level.pathdist_type = PATHDIST_ORIGINAL;
}
function usermap_test_zone_init()
{
zm_zonemgr::add_adjacent_zone( "start_zone", "outside_zone", "enter_outside_zone" );
zm_zonemgr::add_adjacent_zone( "outside_zone", "hallway_zone", "enter_hallway_zone" );
zm_zonemgr::add_adjacent_zone( "hallway_zone", "jug_zone", "enter_jug_zone" );
zm_zonemgr::add_adjacent_zone( "hallway_zone", "power_zone", "enter_power_zone" );
zm_zonemgr::add_adjacent_zone( "start_zone", "speed_zone", "enter_speed_zone" );
level flag::init( "always_on" );
level flag::set( "always_on" );
}
function custom_add_weapons()
{
zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
}
function init_power()
{
level flag::wait_till("power_on");
level util::set_lighting_state(3);
}
And yes, I changed the lighting state on the lights I wanted on by the power, for testing I created 3 lights that had 3 different colors, red was lighting state 2, blue was lighting state 3, and green was lighting state 4.
But didn't turn on with the power.