UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

How To Get Lights To Activate by Power being Turned On?

HOT
broken avatar :(
Created 8 years ago
by SponsoredByCloro
0 Members and 1 Guest are viewing this topic.
13,927 views
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 1 August 2016
Last active: 7 years ago
Posts
7
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Gondor's Groups
Gondor's Contact & Social Links
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!
broken avatar :(
×
broken avatar :(
Location: au
Date Registered: 27 December 2014
Last active: 4 years ago
Posts
13
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
Tomzen's Groups
Tomzen's Contact & Social Links
Any progress on the video?
broken avatar :(
×
broken avatar :(
Location: auAustralia
Date Registered: 4 October 2016
Last active: 7 years ago
Posts
59
Respect
Forum Rank
Rotting Walker
Primary Group
Member
Signature
What is the meaning of life? Dank Memes.
×
SponsoredByCloro's Contact & Social Links
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.
Last Edit: October 09, 2016, 03:01:45 pm by SponsoredByCloro
broken avatar :(
×
broken avatar :(
Location: usGarrett, IN
Date Registered: 4 May 2014
Last active: 5 years ago
Posts
164
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
The world will always underestimate me...until i show them what my creativity is capable of.
×
Erthrock's Groups
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
Last Edit: October 09, 2016, 07:00:22 pm by Erthrock
broken avatar :(
×
broken avatar :(
Location: usNew Jersey
Date Registered: 5 October 2016
Last active: 7 years ago
Posts
15
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
hallowhead1's Groups
hallowhead1's Contact & Social Links
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

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
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 15 February 2014
Last active: 7 years ago
Posts
3
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
WukongBoss's Groups
WukongBoss's Contact & Social Links
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.
broken avatar :(
×
broken avatar :(
Location: auAustralia
Date Registered: 4 October 2016
Last active: 7 years ago
Posts
59
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
SponsoredByCloro's Contact & Social Links
Lol @Erthrock, that post is hella confusing, cheers for the video but! Helped me get mine working :D
broken avatar :(
×
broken avatar :(
Location: usGarrett, IN
Date Registered: 4 May 2014
Last active: 5 years ago
Posts
164
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
Erthrock's Groups
Lol @Erthrock, that post is hella confusing, cheers for the video but! Helped me get mine working :D
lol your welcome
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
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
this if for bo3. anything for waw?

EDIT: actually dw

 
Loading ...