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

Game Starts When I Walk In An Area?

broken avatar :(
Created 10 years ago
by oshawat750
0 Members and 1 Guest are viewing this topic.
4,233 views
broken avatar :(
×
broken avatar :(
Location: usTexas
Date Registered: 12 September 2013
Last active: 1 month ago
Posts
304
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
I make maps for fun, they are mostly crap.
Signature
Maps:
Unterwegs
Hello Kitty Remastered
Firing Range
×
oshawat750's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
oshawat750's Contact & Social LinksOshaPooOshawat750Oshawat750
I want my map to start when I walk into a certain area, so the zombies don't spawn until they go to the area. How would you do that? It's kinda like a paced intro.
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 3 years ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
×
whippytrout's Groups
Mapper Has released one or more maps to the UGX-Mods community.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
First copy _zombiemode.gsc from raw/maps to your mods/mapname/maps folder. Then search for round_start()
Add this under it:
Code Snippet
Plaintext
level waittill("start_rounds");

It will look like this:
Code Snippet
Plaintext
round_start()
{
 level waittill("start_rounds");

Then just use this to start the rounds and zombies spawning:
Code Snippet
Plaintext
level notify("start_rounds");
You can put that wherever your script for starting the rounds is. I would setup a trigger in my map and use that to start the rounds. 
broken avatar :(
×
broken avatar :(
Location: usTexas
Date Registered: 12 September 2013
Last active: 1 month ago
Posts
304
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
I make maps for fun, they are mostly crap.
×
oshawat750's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
oshawat750's Contact & Social LinksOshaPooOshawat750Oshawat750
How would I create a script to start the round with the level notify("start_rounds"); and what should the trigger's KVP's be in radiant?
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 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 Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Code Snippet
Plaintext
round_door()
{
round_door = getent("round_door","targetname");
round_door SetCursorHint("HINT_NOICON");
round_door waittill("trigger");
level notify("start_rounds");
}

create a trigger_multiple in radiant and give it the KVPS. targetname round_door
broken avatar :(
×
broken avatar :(
Location: usTexas
Date Registered: 12 September 2013
Last active: 1 month ago
Posts
304
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
I make maps for fun, they are mostly crap.
×
oshawat750's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
oshawat750's Contact & Social LinksOshaPooOshawat750Oshawat750
Code Snippet
Plaintext
round_door()
{
round_door = getent("round_door","targetname");
round_door SetCursorHint("HINT_NOICON");
round_door waittill("trigger");
level notify("start_rounds");
}

create a trigger_multiple in radiant and give it the KVPS. targetname round_door

I added the script to the bottom of my _zombiemode.gsc and I put the trigger_multiple with the targetname round_door kvp, and nothing happens when I go inside of the trigger.
Marked as best answer by oshawat750 10 years ago
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 3 years ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
×
whippytrout's Groups
Mapper Has released one or more maps to the UGX-Mods community.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
You know what might be better is to just forget about the notify and just do this:
Code Snippet
Plaintext
round_start()
{
activate_trig = getEntArray ("start_rounds", "targetname");

for(i=0;i<activate_trig.size;i++)
{
activate_trig[i] waittill ("trigger");
}

Then just go into radiant and right click and add a trigger_multiple and set it's targetname to start_rounds. That's all you need.   ;)
broken avatar :(
×
broken avatar :(
Location: usTexas
Date Registered: 12 September 2013
Last active: 1 month ago
Posts
304
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
I make maps for fun, they are mostly crap.
×
oshawat750's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
oshawat750's Contact & Social LinksOshaPooOshawat750Oshawat750
You know what might be better is to just forget about the notify and just do this:
Code Snippet
Plaintext
round_start()
{
activate_trig = getEntArray ("start_rounds", "targetname");

for(i=0;i<activate_trig.size;i++)
{
activate_trig[i] waittill ("trigger");
}

Then just go into radiant and right click and add a trigger_multiple and set it's targetname to start_rounds. That's all you need.   ;)
Yes! It worked! Thanks Whippytrout!
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 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 Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
I added the script to the bottom of my _zombiemode.gsc and I put the trigger_multiple with the targetname round_door kvp, and nothing happens when I go inside of the trigger.

You probably didnt thread it then.

Also scripts like that should go in your mapname.gsc not zombiemode
broken avatar :(
×
broken avatar :(
Location: usgeorgia
Date Registered: 24 April 2013
Last active: 3 years ago
Posts
560
Respect
Forum Rank
Zombie Enslaver
Primary Group
Mapper
My Groups
More
My Contact & Social Links
More
×
whippytrout's Groups
Mapper Has released one or more maps to the UGX-Mods community.
whippytrout's Contact & Social LinksWhippyTroutWhippyTrout
Yes! It worked! Thanks Whippytrout!

No problem.  ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 5 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
You know what might be better is to just forget about the notify and just do this:
Code Snippet
Plaintext
round_start()
{
activate_trig = getEntArray ("start_rounds", "targetname");

for(i=0;i<activate_trig.size;i++)
{
activate_trig[i] waittill ("trigger");
}

Then just go into radiant and right click and add a trigger_multiple and set it's targetname to start_rounds. That's all you need.   ;)
if there is more than one trigger placed this method wont work. it will wait for each trigger to be activated one by one.
it might be better to do thezombiekilla6's idea mixed with yours.
either, use getEnt or have a separate method that is threaded on each trigger

 
Loading ...