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

Trigger new zone help

broken avatar :(
Created 10 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
3,641 views
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
I am trying to trigger a zone just by walking into the trigger. (A trigger in the zone I want to activate.) I am using a radius trigger because I wasn't getting results with a multiple trigger.

I've been at this for a couple days now, and have tried many things. I thought this last try was it but I can't seem to trigger the spawns in the new zone without using a zombie_door/magic_door that you have to buy. I am using something like this;

Code Snippet
Plaintext
flag_init("enter_home_zone");
thread homenow();

dlc3_zone_init()
{
    add_adjacent_zone("home_zone","start_zone","enter_home_zone");
}

homenow(){
    home = getEnt("homezone","targetname");
    home waittill("trigger");
    flag_set("enter_home_zone");
    home delete();
    }
}

I have also tried putting the add adjacent zone code after the flag set. The code seems to work when I test with an iprintln either way, but it isn't activating the zombie spawns. Am I on the right track? Am I missing something else?
broken avatar :(
×
broken avatar :(
Location: usNC
Date Registered: 19 June 2013
Last active: 7 years ago
Posts
261
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
GrantDaddy007's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
GrantDaddy007's Contact & Social LinksGrantDaddyGrantdaddy007
I am trying to trigger a zone just by walking into the trigger. (A trigger in the zone I want to activate.) I am using a radius trigger because I wasn't getting results with a multiple trigger.

I've been at this for a couple days now, and have tried many things. I thought this last try was it but I can't seem to trigger the spawns in the new zone without using a zombie_door/magic_door that you have to buy. I am using something like this;

Code Snippet
Plaintext
flag_init("enter_home_zone");
thread homenow();

dlc3_zone_init()
{
    add_adjacent_zone("home_zone","start_zone","enter_home_zone");
}

homenow(){
    home = getEnt("homezone","targetname");
    home waittill("trigger");
    flag_set("enter_home_zone");
    home delete();
    }
}

I have also tried putting the add adjacent zone code after the flag set. The code seems to work when I test with an iprintln either way, but it isn't activating the zombie spawns. Am I on the right track? Am I missing something else?

Got this from Yaphil on another site... I think it's what you need.

You need to make a custom script that allows trigger_multiple to have a script_flag so that you can use that to activate zones.

At the end of mapname.gsc
Code Snippet
Plaintext
set_flag_by_trigger()
{
    assert(IsDefined(self.script_flag));
    flag_init(self.script_flag);
    self waittill("trigger");
    flag_set(self.script_flag);
}

in your mapname.gsc, after _zombiemode::main()

Code Snippet
Plaintext
array_thread(GetEntArray("flag_trigger", "targetname"), ::set_flag_by_trigger);

The Zone needs to be set up just like any zone you would activate with a debris.
The trigger_multiple has targetname = flag_trigger and script_flag = whatever your zone needs it to be.



Marked as best answer by MakeCents 10 years ago
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
you just have to check if the player is touching then set the flag

Code Snippet
Plaintext
trig waittill("trigger");
set_flag(enter_zone1);

you dont need to initiate the flag as it will be initiated by the zone manager.
i have activated zones like this and it works
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
Got this from Yaphil on another site... I think it's what you need.

You need to make a custom script that allows trigger_multiple to have a script_flag so that you can use that to activate zones.

At the end of mapname.gsc
Code Snippet
Plaintext
set_flag_by_trigger()
{
    assert(IsDefined(self.script_flag));
    flag_init(self.script_flag);
    self waittill("trigger");
    flag_set(self.script_flag);
}

in your mapname.gsc, after _zombiemode::main()

Code Snippet
Plaintext
array_thread(GetEntArray("flag_trigger", "targetname"), ::set_flag_by_trigger);

The Zone needs to be set up just like any zone you would activate with a debris.
The trigger_multiple has targetname = flag_trigger and script_flag = whatever your zone needs it to be.

This will be awesome for multiple triggers. I have another map idea where this will be super useful. Thanks.

you just have to check if the player is touching then set the flag

Code Snippet
Plaintext
trig waittill("trigger");
set_flag(enter_zone1);

you dont need to initiate the flag as it will be initiated by the zone manager.
i have activated zones like this and it works

Okay, so it was okay for the most part. I got rid of the extra stuff like you showed. I had 9 zones and was activating this 10th one and guess I didn't test long enough. They seemed to only be spawning in the old zones. I added two more zones in between the 9 and 10 and increased the number of spawners and now I can see it is working. Thanks.
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 1 month ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
you just have to check if the player is touching then set the flag

Code Snippet
Plaintext
trig waittill("trigger");
set_flag(enter_zone1);

you dont need to initiate the flag as it will be initiated by the zone manager.
i have activated zones like this and it works
Can somebody show me an example of how this will look like when you add this in mapname.gsc so I know exactly where I should add all the lines, etc?
broken avatar :(
×
broken avatar :(
Location: usNC
Date Registered: 19 June 2013
Last active: 7 years ago
Posts
261
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
GrantDaddy007's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
GrantDaddy007's Contact & Social LinksGrantDaddyGrantdaddy007
Can somebody show me an example of how this will look like when you add this in mapname.gsc so I know exactly where I should add all the lines, etc?

In your mapname.gsc before maps\_zombiemode::main(); add this

Code Snippet
Plaintext
thread zone1_trig();

At the bottom of mapname.gsc add this... (assuming your next zone is zone1)

Code Snippet
Plaintext
zone1_trig( )
{
trig = getent( "zone1_trig", "targetname" );
trig setCursorHint( "HINT_NOICON" );

trig waittill("trigger");
flag_set("enter_zone1");

}
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
In your mapname.gsc before maps\_zombiemode::main(); add this

Code Snippet
Plaintext
thread zone1_trig();

At the bottom of mapname.gsc add this... (assuming your next zone is zone1)

Code Snippet
Plaintext
zone1_trig( )
{
trig = getent( "zone1_trig", "targetname" );
trig setCursorHint( "HINT_NOICON" );

trig waittill("trigger");
flag_set("enter_zone1");

}

grant actually i think that you should add
Code Snippet
Plaintext
thread zone1_trig();
after zombiemode::main() not before. just add lines before zombiemode for precaching :P
Last Edit: April 19, 2014, 09:09:22 pm by jjbradman
broken avatar :(
×
broken avatar :(
Location: se
Date Registered: 30 July 2013
Last active: 1 month ago
Posts
517
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
Ege115's Groups
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Ege115's Contact & Social LinksEge115
Don't I also have to add a flag_init for that?

Anyways, I'll reply here when I have got time to test it.
Thanks in the meantime :D.
broken avatar :(
×
broken avatar :(
drago
Location: mx
Date Registered: 5 July 2013
Last active: 4 years ago
Posts
941
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
jjbradman's Groups
jjbradman's Contact & Social Linksjjbradmanjjbradmanjjbradman
Don't I also have to add a flag_init for that?

Anyways, I'll reply here when I have got time to test it.
Thanks in the meantime :D.
no, the flag gets initialized in the adjacent zone set up, you just need to set the flag whenever you want.
also if you initialize the flag in your script and then set it it wont do anything so just make your zones the way they are supposed to and the you can play with their flags xD
broken avatar :(
×
broken avatar :(
Location: usNC
Date Registered: 19 June 2013
Last active: 7 years ago
Posts
261
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper Elite
My Groups
More
My Contact & Social Links
More
×
GrantDaddy007's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
GrantDaddy007's Contact & Social LinksGrantDaddyGrantdaddy007
grant actually i think that you should add
Code Snippet
Plaintext
thread zone1_trig();
after zombiemode::main() not before. just add lines before zombiemode for precaching :P
I've got mine at the very top of mapname.gsc and it tested fine...

 
Loading ...