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

Door that needs power, then becomes buyable?

HOT
broken avatar :(
Created 9 years ago
by ProRevenge
0 Members and 1 Guest are viewing this topic.
5,370 views
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
Signature
Stranded
Nacht Der Untoten: Reimagined
Encampment
Encampment V2: BO3 Mod

Mapper and Weapon Porter - I release what I can of my work for the community to enjoy :)
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
What I want, is a door, that needs power, and shows the "you must turn power on first!" hintstring, but after the power turns on, becomes a normal buyable door.

Closest ive come is using script_noteworthy electric_door, which results in it opening on power being turned on.

Anyone know how I can achieve this?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: tr
Date Registered: 1 March 2013
Last active: 3 days ago
Posts
816
Respect
Forum Rank
The Decider
Primary Group
2015 Contest Winner
My Groups
More
My Contact & Social Links
More
Personal Quote
Caw caw caw
×
johndoe's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
2015 Contest Winner
johndoe's Contact & Social Linksmyc153-johndoe
you can disable its trigger and put another trigger there that says you need to turn on the power to open it. and put a flag_wait for electricy_on (i may be wrong about it's name since i haven't touched waw since may), delete that trigger and enable the door's actual trigger.
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
I wouldnt know where to begin scripting that, but im aware its a possibility. If that will work, thatll be great
Marked as best answer by ProRevenge 9 years ago
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
In your mapname.gsc under maps/zombiemode_main type
Code Snippet
Plaintext
 thread power_door();

At the bottom of the file, paste this into it

Code Snippet
Plaintext
power_door()
{
door_trig = getent("TARGET_OF_TRIG","target");
door_trig SetCursorHint("HINT_NOICON");
door_trig disable_trigger();
power_door_trig = getent("need_power","targetname");
power_door_trig SetCursorHint("HINT_NOICON");
power_door_trig SetHintString("Power must be activated first");
flag_wait( "electricity_on" );
power_door_trig delete();
door_trig enable_trigger();
}

change TARGET_OF_TRIG, to the name of the target that is on the trig, not the targetname. so like target, door1 etc.

Then make a new trig that overlaps that trig and name it Key: targetname, Value: need_power. That should cover it

Not tested, so let me know how it does.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
In your _zombiemode_blockers_new.gsc find the door_think function, and add to the else another if statement:

Code Snippet
Plaintext

door_think()
{
// maybe the door the should just bust open instead of slowly opening.
// maybe just destroy the door, could be two players from opposite sides..
// breaking into chunks seems best.
// or I cuold just give it no collision
while( 1 )
{
if(isDefined(self.script_noteworthy) && self.script_noteworthy == "electric_door")
{
flag_wait( "electricity_on" );
}
else
{
self waittill( "trigger", who );
if( !who UseButtonPressed() )
{
continue;
}


Make it look like this:

Code Snippet
Plaintext
door_think()
{
// maybe the door the should just bust open instead of slowly opening.
// maybe just destroy the door, could be two players from opposite sides..
// breaking into chunks seems best.
// or I cuold just give it no collision
while( 1 )
{
if(isDefined(self.script_noteworthy) && self.script_noteworthy == "electric_door"  && !isDefined(self.zombie_cost))
{
flag_wait( "electricity_on" );
}
else
{
if(isDefined(self.script_noteworthy) && self.script_noteworthy == "electric_door"){
flag_wait( "electricity_on" );
cost = 1000;
if( IsDefined( self.zombie_cost ) ) cost = self.zombie_cost;
self set_hint_string( self, "default_buy_door_" + cost );
}
self waittill( "trigger", who );
if( !who UseButtonPressed() )
{
continue;
}


Then you can use electric and zombie_cost on the same door.
Last Edit: September 19, 2015, 01:48:45 am by MakeCents
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
×
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
In your _zombiemode_blockers_new.gsc find the door_think function, and add to the else another if statement:

Code Snippet
Plaintext

door_think()
{
// maybe the door the should just bust open instead of slowly opening.
// maybe just destroy the door, could be two players from opposite sides..
// breaking into chunks seems best.
// or I cuold just give it no collision
while( 1 )
{
if(isDefined(self.script_noteworthy) && self.script_noteworthy == "electric_door")
{
flag_wait( "electricity_on" );
}
else
{
self waittill( "trigger", who );
if( !who UseButtonPressed() )
{
continue;
}


Make it look like this:

Code Snippet
Plaintext
door_think()
{
// maybe the door the should just bust open instead of slowly opening.
// maybe just destroy the door, could be two players from opposite sides..
// breaking into chunks seems best.
// or I cuold just give it no collision
while( 1 )
{
if(isDefined(self.script_noteworthy) && self.script_noteworthy == "electric_door"  && !isDefined(self.zombie_cost))
{
flag_wait( "electricity_on" );
}
else
{
if(isDefined(self.script_noteworthy) && self.script_noteworthy == "electric_door"){
flag_wait( "electricity_on" );
cost = 1000;
if( IsDefined( self.zombie_cost ) ) cost = self.zombie_cost;
self set_hint_string( self, "default_buy_door_" + cost );
}
self waittill( "trigger", who );
if( !who UseButtonPressed() )
{
continue;
}


Then you can use electric and zombie_cost on the same door.

Ya, that seems better than my way. Use this instead
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
Used zombiekillers way before seeing MakeCents way, it worked fine.
Thank you both anyway :)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Used zombiekillers way before seeing MakeCents way, it worked fine.
Thank you both anyway :)

Oh, I thought you wanted it to be a door trigger after electric was on. Wait till purchased, connect paths, move the door, enable the zone, stuff like that.
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
Yeah that is what I wanted, and it works fine.

Door says needs power, I turn power on, it becomes buy for 1000, and buying it activates zone/spawners etc
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Yeah that is what I wanted, and it works fine.

Door says needs power, I turn power on, it becomes buy for 1000, and buying it activates zone/spawners etc

I'm glad you got it working, but all that script does is hide a trig, and show the trig after electric, deleting a trig. You'll need more scripting for the rest. You should post the rest of the script for those that come to this post later, or not. Up to you.

Spoiler: click to open...
Two issues that way, adding an extra ent that isn't needed (closer to gspawn), and adding another hintstring towards the limit. You should use the perks one so it doesn't.NO_FLAMES something or other
Last Edit: September 19, 2015, 12:30:10 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
If G-spawn risk is increased, then I will go for your method.

But the rest of the script? The only changes I made were what was posted at the bottom of mapname
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
If G-spawn risk is increased, then I will go for your method.

But the rest of the script? The only changes I made were what was posted at the bottom of mapname

Only by one. I'm not trying to convince you other wise. Use what you have working. I just wouldn't do toys for 20 doors. And I didn't see how that was all the script. That trig must be involved some other way.
Last Edit: September 19, 2015, 01:22:51 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
Well adding only what was posted there worked, the rest of the door was handled the way any other door would be
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Well adding only what was posted there worked, the rest of the door was handled the way any other door would be

So the trigger kvp, for the door, was zombie_door then?
Last Edit: September 19, 2015, 01:27:20 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: gbEast Midlands
Date Registered: 7 February 2015
Last active: 3 years ago
Posts
643
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Donations massively appreciated: paypal.me/DanT98
×
ProRevenge's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
ProRevenge's Contact & Social LinksProRevenge
It was door1, the targetname of the clip, door and trigger I was using, the rest of the door set up like a normal door

 
Loading ...