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

Disable a zone

broken avatar :(
Created 9 years ago
by Soy-Yo
0 Members and 1 Guest are viewing this topic.
2,772 views
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
I want an entire room to be moved. I have risers in that room, so I have to teleport the structs as they can't be moved. So I need first to stop the zombies spawning. I tried by turning off the zone and then on with:
Code Snippet
Plaintext
zone trigger_off();
// ...
zone trigger_on();
And this actually works, but it doesn't move the zone as it is disabled. I tried also setting the .is_active = false and .is_enabled = false, but they do nothing.
Any idea?
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Im not sure what the function trigger_off() does, but the function disable_trigger() move's the trigger down 10000 units. So it's not actually disabled, it's just out of reach.
Maybe that's the same with trigger_off() and that's messing with your move commands??

Also, the zone being an info_volume, i'm not sure if you can move those. Could be you need to 'teleport' them as well, just like the structs.



enable_trigger() / disable_trigger() functions from _zombiemode_utility:
Spoiler: click to open...
Code Snippet
Plaintext
disable_trigger()
{
if( !IsDefined( self.disabled ) || !self.disabled )
{
self.disabled = true;
self.origin = self.origin -( 0, 0, 10000 );
}
}

enable_trigger()
{
if( !IsDefined( self.disabled ) || !self.disabled )
{
return;
}

self.disabled = false;
self.origin = self.origin +( 0, 0, 10000 );
}
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
I used something like this before to turn a zone off.
Code Snippet
Plaintext
zonedisabletrig = getent ("zonedisabletrig" , "targetname");
zonedisabletrig waittill ("trigger");
for(x=0;x<level.zones[ "start_zone" ].spawners.size;x++)
{
level.zones[ "start_zone" ].spawners[x].locked_spawner = true;
level.enemy_spawns = array_remove_nokeys(level.enemy_spawns, level.zones[ "start_zone" ].spawners[x]);
}
level.zones[ "start_zone" ].is_enabled = false; // Does the zone need to be evaluated?
level.zones[ "start_zone" ].is_occupied = false; // Is the zone occupied by a player?
level.zones[ "start_zone" ].is_active = false; // Are the spawners currently enabled for spawning?
}
[code/]
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Im not sure what the function trigger_off() does, but the function disable_trigger() move's the trigger down 10000 units. So it's not actually disabled, it's just out of reach.
Maybe that's the same with trigger_off() and that's messing with your move commands??

Also, the zone being an info_volume, i'm not sure if you can move those. Could be you need to 'teleport' them as well, just like the structs.
So trigger_off() does the same as disable_trigger().

I used something like this before to turn a zone off.
Code Snippet
Plaintext
zonedisabletrig = getent ("zonedisabletrig" , "targetname");
zonedisabletrig waittill ("trigger");
for(x=0;x<level.zones[ "start_zone" ].spawners.size;x++)
{
level.zones[ "start_zone" ].spawners[x].locked_spawner = true;
level.enemy_spawns = array_remove_nokeys(level.enemy_spawns, level.zones[ "start_zone" ].spawners[x]);
}
level.zones[ "start_zone" ].is_enabled = false; // Does the zone need to be evaluated?
level.zones[ "start_zone" ].is_occupied = false; // Is the zone occupied by a player?
level.zones[ "start_zone" ].is_active = false; // Are the spawners currently enabled for spawning?
}
[code/]
I like that function, but I don't understand it at all, so I think I wouldn't know to turn the zone on again lol.

Anyway, thank both of you very much for the ideas, but I made a shi*** function that changes the origin of the zone, then disables it and, after the move has been done, it enables the zone again. I don't like how I made it but it works, so I I'll use it.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
So trigger_off() does the same as disable_trigger().

Im not sure what the function trigger_off() does, but...


I like that function, but I don't understand it at all, so I think I wouldn't know to turn the zone on again lol.

Code Snippet
Plaintext
zonedisabletrig = getent ("zonedisabletrig" , "targetname");
zonedisabletrig waittill ("trigger");
for(x=0;x<level.zones[ "start_zone" ].spawners.size;x++)
{
level.zones[ "start_zone" ].spawners[x].locked_spawner =false;
level.enemy_spawns = array_remove_nokeys(level.enemy_spawns, level.zones[ "start_zone" ].spawners[x]);
}
level.zones[ "start_zone" ].is_enabled = true; // Does the zone need to be evaluated?
level.zones[ "start_zone" ].is_occupied = true; // Is the zone occupied by a player?
level.zones[ "start_zone" ].is_active =true; // Are the spawners currently enabled for spawning?
}

Just a wild guess  :P
Last Edit: September 10, 2015, 06:39:08 pm by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
To enable a zone I think all you need is
//
activatemyzonetrigger waittill ("trigger");
maps\_zombiemode_zone_manager::enable_zone( "zone1" );
//
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
To enable a zone I think all you need is
//
activatemyzonetrigger waittill ("trigger");
maps\_zombiemode_zone_manager::enable_zone( "zone1" );
//

Even better  :) my bad..
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 5 days ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
To enable a zone I think all you need is
//
activatemyzonetrigger waittill ("trigger");
maps\_zombiemode_zone_manager::enable_zone( "zone1" );
//

What I used for PaP area in Rainy Death:
Code Snippet
Plaintext
flag_set("enter_zone_6");

 
Loading ...