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

Can't Activate Zone

broken avatar :(
Created 6 years ago
by andrizzlepc
0 Members and 1 Guest are viewing this topic.
715 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 25 July 2018
Last active: 5 years ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
andrizzlepc's Groups
andrizzlepc's Contact & Social Links
I'm having some trouble activating a zone with a custom trigger. I want to activate a zone with a simple trigger that rotates and opens a door. I'm not using a regular "zombie_door" trigger cus I wanted to control the speed of the door opening. My issue is that when I put a "script_flag" KVP on the trigger it doesn't activate the zone. In my script I have.

zm_zonemgr::add_adjacent_zone( "start_zone", "bunker_entrance_zone", "open_bunker" );

The script_flag KVP has the value "open_bunker" but when I enter the zone it kills me instantly. So then I tried putting the add zone code IN the trigger code.

Code Snippet
Plaintext
function vault_door()
{
v_trigger = GetEnt("vault_trigger", "targetname");
v_trigger setHintString("Hold ^3&&1^7 to open the Bunker door [Cost: 1000]");
v_trigger setCursorHint("HINT_NOICON");

v_trigger thread v_open();
}

function v_open()
{
vault_hint = GetEnt("vault_hint", "targetname");
vault_hint setHintString("The Bunker door is sealed");
vault_hint setCursorHint("HINT_NOICON");

handle = GetEnt("vault_switch", "targetname");

door_left = GetEnt("left_door", "targetname");
door_right = GetEnt("right_door", "targetname");
door_clip = GetEnt("door_barrier", "targetname");

level.trapCost = 1000;

while(1)
{
self waittill("trigger", player);

if (player.score >= level.trapCost)
{
player zm_score::minus_to_player_score(level.trapCost);
self playsound("zmb_cha_ching");
handle RotateRoll(-90,0.25);
                        zm_zonemgr::add_adjacent_zone( "start_zone", "bunker_entrance_zone" );
break;
}
else
{
self playsound("deny");
}
}

//open vault door
door_left RotateYaw(150,2);
door_right RotateYaw(-150,2);

self delete();
vault_hint delete();
door_clip delete();
}

Now in this situation I can enter the zone but zombie spawners don't work?? Any help appreciated!!

 
Loading ...