UGX-Mods

Call of Duty: Black Ops 3 => Help Desk => Topic started by: r00ster on February 24, 2017, 06:10:27 am

Title: Make Quick Revive Perk Require Power
Post by: r00ster on February 24, 2017, 06:10:27 am
Hi!

How do I make the 'Quick Revive' perk require power in the BO3 mod tool?  Every other perk machine prefab seems to start associated with the power switch prefab, and requires that you flip the switch before use.  However, the "Quick Revive" is purchasable even before the power is turned on.  I've tried linking the two, but it didn't have the desired result  Thanks in advance!
Title: Re: Make Quick Revive Perk Require Power
Post by: thezombieproject on February 24, 2017, 07:15:29 am
TRY going to yourmapname.gsc and above zm_usermap::main();
add this line
Code Snippet
Plaintext
level.initial_quick_revive_power_off = true;

havent tested this yet but might do the trick let me know ;)
Title: Re: Make Quick Revive Perk Require Power
Post by: r00ster on February 25, 2017, 08:04:59 am
TRY going to yourmapname.gsc and above zm_usermap::main();
add this line
Code Snippet
Plaintext
level.initial_quick_revive_power_off = true;

havent tested this yet but might do the trick let me know ;)

That worked!...kind of..lol.  The machine now starts off, and shows the message that it needs the power on, however, when I flip the switch it does not turn on.  Again, tried linking the two , without the desired effect.  :(
Title: Re: Make Quick Revive Perk Require Power
Post by: thezombieproject on February 25, 2017, 04:47:46 pm
ok thanks for testing that im home now so i can look into it. It might not be getting notified when power is turned on ill take a look.

Double Post Merge: February 25, 2017, 11:09:54 pm

yourmapname.gsc and above zm_usermap::main();
replace: level.initial_quick_revive_power_off = true;  ( if you still have it there )
WITH:
Code Snippet
Plaintext
thread reviveoffatstart(true); // true or false  

At the bottom of script add this:
Code Snippet
Plaintext
function reviveoffatstart(on_off){
if(!isDefined(on_off) || !on_off) return;
level.initial_quick_revive_power_off = true;
level flag::wait_till( "power_on" );
level notify( "revive_on" );
}

should work. Let me know ;)

Title: Re: Make Quick Revive Perk Require Power
Post by: r00ster on February 26, 2017, 10:40:43 pm
ok thanks for testing that im home now so i can look into it. It might not be getting notified when power is turned on ill take a look.

Double Post Merge: February 25, 2017, 11:09:54 pm

yourmapname.gsc and above zm_usermap::main();
replace: level.initial_quick_revive_power_off = true;  ( if you still have it there )
WITH:
Code Snippet
Plaintext
thread reviveoffatstart(true); // true or false  

At the bottom of script add this:
Code Snippet
Plaintext
function reviveoffatstart(on_off){
if(!isDefined(on_off) || !on_off) return;
level.initial_quick_revive_power_off = true;
level flag::wait_till( "power_on" );
level notify( "revive_on" );
}

should work. Let me know ;)

Wow!  That worked.  Thanks so much for the help!  Mind if I ask, how you figured that out? For example, how did you know  the notify function argument was "revive_on"?  Is there documentation somewhere?  I have sublime text set up with the gsc definitions, but it only shows function names, no details on what they do.  I assume that the 'level flag' code corresponds to the kvp 'script_flag' ?

Thanks again for figuring that out!
Title: Re: Make Quick Revive Perk Require Power
Post by: thezombieproject on February 27, 2017, 04:30:21 pm
glad to help :) https://gyazo.com/296c579957dd91f5e8d9e4e6047738af (https://gyazo.com/296c579957dd91f5e8d9e4e6047738af)