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

[Tutorial] Perk Specific Power Switches

broken avatar :(
Created 10 years ago
by daedra descent
0 Members and 1 Guest are viewing this topic.
4,762 views
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Requirement notice: The stock power switch IS REQUIRED for this to work properly. Bad things might happen if you don't add it. It doesn't matter where you put the switch, just make sure its in the map!

Custom perk notice: It is possible to add your own custom perk switches using this script, however i'm not going to explain how to do it in this tutorial.

How to add it to YOUR map

1. copy the IWD to your root/mods folder

2. Open mapname.gsc(mapname is the name of your map). Add this:

Code Snippet
Plaintext
thread maps\_zombiemode_power::main();

under:

Code Snippet
Plaintext
	/*--------------------
FUNCTION CALLS - POST _Load
----------------------*/

3. Add the provided prefabs into your map.

4. recompile your map and your IWD.

5. You should now have fully working perk specific power switches. DONE!

If you would like to add custom perks then feel free to modify the script in the IWD.


broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
Nice tutorial! +1
broken avatar :(
×
broken avatar :(
Location: auAustralia
Date Registered: 8 January 2014
Last active: 6 years ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
×
Naminator999'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
Nice.

If i still use the power switch to power on lights will that effect the perk power switches
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Nice.

If i still use the power switch to power on lights will that effect the perk power switches

Activating any of the power switches should do that. Activating the stock one will turn the perks on like normal.
broken avatar :(
×
broken avatar :(
Location: auAustralia
Date Registered: 8 January 2014
Last active: 6 years ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Naminator999'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
If i was to use ur script for perk power switches how would i add the other perks and also the ability to turn on the lights? So i dont have to use stock power switch which would override the perk switches
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
If i was to use ur script for perk power switches how would i add the other perks and also the ability to turn on the lights? So i dont have to use stock power switch which would override the perk switches

I've never used electric lights before, but i assume they are activated using:

Code Snippet
Plaintext
flag_set( "electricity_on" );

which the script has. As soon as you activate any of the switches your lights -should- turn on.

As for custom perks, open up the script file and add:

Code Snippet
Plaintext
	PERKHERE_power = getent("PERKHERE_power","targetname");
PERKHERE_lever = getent(PERHERE_power.target,"targetname");

*PERHERE can be anything as long as its case(below)

Then in the same function(main) add

Code Snippet
Plaintext
	if(isdefined(PERKHERE_power) && isdefined(PERKHERE_lever) )
{
level thread power_init(PERKHERE_power, PERKHERE_lever, "Press F to activate PERKHERE");
}

Now below in the power_init() function, add your new perk to the case like:

Code Snippet
Plaintext
		case "PERKHERE_power":
level notify( "PERK_NOTIFY" );
break;

Make sure EVERYTHING looks like it does in the script.

EDIT: For radiant stamp one of the prefabs and change the KVP's to the targetname. Make sure the trigger is linked to the lever.

Last Edit: June 08, 2014, 03:34:40 am by daedra descent
broken avatar :(
×
broken avatar :(
Location: auAustralia
Date Registered: 8 January 2014
Last active: 6 years ago
Posts
106
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Naminator999'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
Hey daedra.

Do you know of any way to stop the perk power switches from turning on any light_electic scripted primary lights i have in my map and to set up a seperate power switch for them?

Thanks.
broken avatar :(
×
broken avatar :(
Location: gbUnited Kingdom
Date Registered: 15 January 2014
Last active: 8 years ago
Posts
33
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
BishyFTW's Groups
BishyFTW's Contact & Social LinksPhilbishop4BishyFTWBishyFTW1
Can someone tell me how to script the black ops perks in please? im a noob

 
Loading ...