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

How to activate a zone via script?

broken avatar :(
Created 10 years ago
by Dust
0 Members and 1 Guest are viewing this topic.
2,453 views
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
Okay I am working on the next step of my easter egg and i wanted to know what is the command to activate a zone via script? I know the easiest way would be to make a trigger with the enter_zone kvp but thats not really possible since im having it where they have to pick up something, carry it somewhere else, then the door will open, so theres like 3-4 triggers and it would be hard to make it like that.
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
Heres the vars for zone activation:

Code Snippet
Plaintext
	level.zones[ zone_name ].is_enabled = false;	// Does the zone need to be evaluated?
level.zones[ zone_name ].is_occupied = false; // Is the zone occupied by a player?
level.zones[ zone_name ].is_active = false; // Are the spawners currently enabled for spawning?

But it might just be easier to give the trigger the KVP's instead.
Marked as best answer by thezombiekilla6 10 years ago
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 9 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Okay I am working on the next step of my easter egg and i wanted to know what is the command to activate a zone via script? I know the easiest way would be to make a trigger with the enter_zone kvp but thats not really possible since im having it where they have to pick up something, carry it somewhere else, then the door will open, so theres like 3-4 triggers and it would be hard to make it like that.
The trigger just sets a flag. Everything deadra just posted could be done with one line

Code Snippet
Plaintext
flag_set("enter_zone_name_flag");
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
The trigger just sets a flag. Everything deadra just posted could be done with one line

Code Snippet
Plaintext
flag_set("enter_zone_name_flag");

i tried writing
Code Snippet
Plaintext
flag_set("enter_zone1");

but after it gets to that part of the script the game lags for a couple of seconds and then when i walk into that zone the rounds start skipping like its not been activated
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 9 months ago
Posts
5,551
Respect
6,691Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
i tried writing
Code Snippet
Plaintext
flag_set("enter_zone1");

but after it gets to that part of the script the game lags for a couple of seconds and then when i walk into that zone the rounds start skipping like its not been activated
You probably tried to set the flag before it had been initialized by the dlc3_zone_setup() function in your map gsc.
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
You probably tried to set the flag before it had been initialized by the dlc3_zone_setup() function in your map gsc.

Awesome! Works perfect, thanks

 
Loading ...