Make Quick Revive Perk Require Power

broken avatar :(
Created 972 days ago
by r00ster
0 Members and 1 Guest are viewing this topic.
1,445 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 December 2016
Last active: 968 days ago
Posts
12
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
r00ster's Groups
r00ster's Contact & Social Links
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!
broken avatar :(
×
broken avatar :(
Location: usNUKETOWN
Date Registered: 19 February 2014
Last active: 943 days ago
Posts
177
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Specialist
Signature
×
thezombieproject's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
TRY going to yourmapname.gsc and above zm_usermap::main();
add this line
level.initial_quick_revive_power_off = true;

havent tested this yet but might do the trick let me know ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 December 2016
Last active: 968 days ago
Posts
12
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
r00ster's Groups
r00ster's Contact & Social Links
TRY going to yourmapname.gsc and above zm_usermap::main();
add this line
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.  :(
broken avatar :(
×
broken avatar :(
Location: usNUKETOWN
Date Registered: 19 February 2014
Last active: 943 days ago
Posts
177
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Specialist
×
thezombieproject's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
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:
thread reviveoffatstart(true); // true or false  

At the bottom of script add this:
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 ;)

Last Edit: February 25, 2017, 11:09:54 pm by thezombieproject
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 December 2016
Last active: 968 days ago
Posts
12
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
r00ster's Groups
r00ster's Contact & Social Links
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:
thread reviveoffatstart(true); // true or false  

At the bottom of script add this:
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!
broken avatar :(
×
broken avatar :(
Location: usNUKETOWN
Date Registered: 19 February 2014
Last active: 943 days ago
Posts
177
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Specialist
×
thezombieproject's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
glad to help :) [You are not allowed to view external links. Register or Login to see them]

 

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 Twitch
Loading ...