UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Mapping => Topic started by: SponsoredByCloro on October 04, 2016, 03:11:05 pm

Title: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 04, 2016, 03:11:05 pm
Aight, so i've been trying to figure this out for quite a while, can't seem to get it to work.

I'm trying to get my lights turn on when the power has been turned on, but I don't know the KVPs for it.

Any help is appreciated, thanks :)
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: xbrunerohd on October 05, 2016, 03:03:47 am
That's a good question, I also want to know that.
I already set up my lights to only turn on in Light State 2 which will be the State when the power is on. But always when I start my map everything is already turned on. What can we do here?
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: hallowhead1 on October 05, 2016, 03:17:57 am
I was able to do this today after extensive hours spent by creating two lighting states!

Lighting state 1 was just zombie factory, then after you switch the power switch it switches to lighting state 2.
I set all my perk machines to lighting state 2 so when the power switch was flipped the lights turned on.

However it gets a little tricky because you have to copy the zm_giant.gsc power aspects over to your new maps gsc...

If you need any further help i'd be glad to make a video for you

I would almost guarantee there is a quicker and faster way of doing this!  If anyone else knows please shed some light

Double Post Merge: October 05, 2016, 01:04:30 pm
That's a good question, I also want to know that.
I already set up my lights to only turn on in Light State 2 which will be the State when the power is on. But always when I start my map everything is already turned on. What can we do here?

You have to add it to your mapnamehere.gsc file in your usermap folder, that after the power turns on to change your lighting state.

Unless you already have that set properly, then I too have the same error, so I just switched the states, so that everything is off on state 2 (which seems to always be default) and put state 1 as my power on
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 05, 2016, 01:16:12 pm
I was able to do this today after extensive hours spent by creating two lighting states!

Lighting state 1 was just zombie factory, then after you switch the power switch it switches to lighting state 2.
I set all my perk machines to lighting state 2 so when the power switch was flipped the lights turned on.

However it gets a little tricky because you have to copy the zm_giant.gsc power aspects over to your new maps gsc...

If you need any further help i'd be glad to make a video for you
I looked for the zm_giant.gsc, but there doesn't seem to be one.. :/
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 05, 2016, 02:07:33 pm
Found the .gsc, I looked through it all, don't understand much though.. :/

I've found
level util::set_lighting_state( 0 );

and
function power_electric_switch()

I'm not to sure how to implement it into my map though.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 05, 2016, 02:17:36 pm
I'd highly recommend for you to make a YouTube video on it, many people don't know how to do it and i've researched everywhere over Google & YouTube and i can't find any info on how to.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: Harry Bo21 on October 05, 2016, 04:09:25 pm
I'd highly recommend for you to make a YouTube video on it, many people don't know how to do it and i've researched everywhere over Google & YouTube and i can't find any info on how to.
its not the correct way anyway, as its either "all on or "all off" disregarding solo revive
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 05, 2016, 08:32:51 pm
its not the correct way anyway, as its either "all on or "all off" disregarding solo revive
Well i'd still like to know how to do it, I don't want it just for the Perk Machines, I want my entire map to light up when you turn the power on.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: xbrunerohd on October 05, 2016, 10:34:14 pm
Yeah, I would like to know how to do it too, so I could set up perk lights and all my map lights to turn on with the power. Also if the Light State 2 is the default it should have a way to change that to Light State 1 for being the default one. If you guys could make a video it would be good. Thanks.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: reckfullies on October 06, 2016, 12:26:47 am
You could just do it through a script by getting all the light ents and setting the kvp for intensity or something like that.

Not sure if thats possible in bo3 though.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: hallowhead1 on October 06, 2016, 04:13:19 pm
its not the correct way anyway, as its either "all on or "all off" disregarding solo revive

You say this isn't the right way, yet you don't include the proper way to do so?

If you guys are really interested, i'd be glad to make a quick tutorial - just let me know..
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: Gondor on October 06, 2016, 11:34:22 pm
Can somebody make a video on this? Best way to learn is by watching a video of someone else doing it and showing you where everything is
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: xTundra on October 07, 2016, 07:31:47 am
You say this isn't the right way, yet you don't include the proper way to do so?

If you guys are really interested, i'd be glad to make a quick tutorial - just let me know..

I would greatly appreciate that!
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 07, 2016, 01:55:15 pm
You say this isn't the right way, yet you don't include the proper way to do so?

If you guys are really interested, i'd be glad to make a quick tutorial - just let me know..
Yes please do!
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: hallowhead1 on October 07, 2016, 05:52:03 pm
I will make a video either tonight, or tomorrow!
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: Gondor on October 08, 2016, 06:44:38 am
Go to your map gsc file under your map's scripts folder and than under function main add
Code Snippet
Plaintext
thread init_power();
than copy and paste this to the bottom of your gsc script
Code Snippet
Plaintext
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
Code Snippet
Plaintext
level util::set_lighting_state(statenumberhere)

Big thanks to Author for teaching me on discord!
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: Tomzen on October 08, 2016, 07:15:37 am
Any progress on the video?
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 08, 2016, 03:59:46 pm
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
Code Snippet
Plaintext
thread init_power();
than copy and paste this to the bottom of your gsc script
Code Snippet
Plaintext
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
Code Snippet
Plaintext
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
Code Snippet
Plaintext
#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.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: Erthrock on October 09, 2016, 05:35:18 pm
if i get it working will make a video, but is anyone got it working?

Double Post Merge: October 09, 2016, 06:19:25 pm
if i get it working will make a video, but is anyone got it working?
i got it working, im recording tutorial will be up in a few min

Double Post Merge: October 09, 2016, 07:00:22 pm
if i get it working will make a video, but is anyone got it working?

Double Post Merge: October 09, 2016, 06:19:25 pm
i got it working, im recording tutorial will be up in a few min
heres the video http://www.youtube.com/watch?v=PKDWNyUeNws (http://www.youtube.com/watch?v=PKDWNyUeNws)
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: hallowhead1 on October 09, 2016, 10:21:09 pm
if i get it working will make a video, but is anyone got it working?

Double Post Merge: October 09, 2016, 06:19:25 pm
i got it working, im recording tutorial will be up in a few min

Double Post Merge: October 09, 2016, 07:00:22 pm
heres the video http://www.youtube.com/watch?v=PKDWNyUeNws (http://www.youtube.com/watch?v=PKDWNyUeNws)

Sorry lads wasn't able to get a video out - had a family party ! Glad Gondor was able to understand me on discord and make a small tutorial here !! I'll still probably make a video eventually, but sorry for all who waited
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: WukongBoss on October 10, 2016, 12:00:09 am
Could you highlight this post as solved pls for everyone who is looking to let his/her lights work when the power is turned on.
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: SponsoredByCloro on October 10, 2016, 01:36:20 am
Lol @Erthrock, that post is hella confusing, cheers for the video but! Helped me get mine working :D
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: Erthrock on October 10, 2016, 08:23:53 pm
Lol @Erthrock, that post is hella confusing, cheers for the video but! Helped me get mine working :D
lol your welcome
Title: Re: How To Get Lights To Activate by Power being Turned On?
Post by: DeletedUser on January 04, 2021, 09:34:56 pm
if i get it working will make a video, but is anyone got it working?

Double Post Merge: October 09, 2016, 06:19:25 pm

i got it working, im recording tutorial will be up in a few min

Double Post Merge: October 09, 2016, 07:00:22 pm

heres the video http://www.youtube.com/watch?v=PKDWNyUeNws (http://www.youtube.com/watch?v=PKDWNyUeNws)
this if for bo3. anything for waw?

EDIT: actually dw