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

Doors that open at specific rounds?

broken avatar :(
Created 8 years ago
by SefSefHD
0 Members and 1 Guest are viewing this topic.
4,361 views
broken avatar :(
×
broken avatar :(
Location: ae
Date Registered: 24 June 2016
Last active: 8 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
SefSefHD's Groups
SefSefHD's Contact & Social LinksMirdiff
Hello again!

Im trying to implement a door that opens at round 30. This is a very original idea and i think its pretty slick. So will there be any messing about with the scripting or is it just basic KVP editing? :D

P.S If it is possible, please tell me how <3
Thank you
broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 5 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
Signature
⠀⠀⠀⣴⣴⡤
⠀⣠⠀⢿⠇⡇⠀⠀⠀⠀⠀⠀⠀⢰⢷⡗
⠀⢶⢽⠿⣗⠀⠀⠀⠀⠀⠀⠀⠀⣼⡧⠂⠀⠀⣼⣷⡆
⠀⠀⣾⢶⠐⣱⠀⠀⠀⠀⠀⣤⣜⣻⣧⣲⣦⠤⣧⣿⠶
⠀⢀⣿⣿⣇⠀⠀⠀⠀⠀⠀⠛⠿⣿⣿⣷⣤⣄⡹⣿⣷
⠀⢸⣿⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿
⠀⠿⠃⠈⠿⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠿⠿⠿

⠀⢀⢀⡀⠀⢀⣤⠀⠀⠀⠀⠀⠀⠀⡀⡀
⠀⣿⡟⡇⠀⠭⡋⠅⠀⠀⠀⠀⠀⢰⣟⢿
⠀⣹⡌⠀⠀⣨⣾⣷⣄⠀⠀⠀⠀⢈⠔⠌
⠰⣷⣿⡀⢐⢿⣿⣿⢻⠀⠀⠀⢠⣿⡿⡤⣴⠄⢀⣀⡀
⠘⣿⣿⠂⠈⢸⣿⣿⣸⠀⠀⠀⢘⣿⣿⣀⡠⣠⣺⣿⣷
⠀⣿⣿⡆⠀⢸⣿⣿⣾⡇⠀⣿⣿⣿⣿⣿⣗⣻⡻⠿⠁
⠀⣿⣿⡇⠀⢸⣿⣿⡇⠀⠀⠉⠉⠉⠉⠉⠉⠁
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
Koan's Contact & Social Linksh-r_Koan_my website
This is a very original idea
:please:



Set up the door as you would normally, make sure the trigger is a trigger_use, then give the trigger the KVP "script_string" / "door_thirty_trig".

In _zombiemode.gsc, at the bottom of the main() function, add:
Code Snippet
Plaintext
level thread butt_stuff();


Then add this new function to the script:
Code Snippet
Plaintext
butt_stuff()
{
self endon("disconnect");

sef_trig = getEnt("door_thirty_trig","script_string");
sef_trig SetCursorHint("HINT_NOICON");
sef_trig UseTriggerRequireLookAt();
sef_trig SetHintString("Come back at round 30...");

cost = sef_trig.zombie_cost;

while(1)
{
if(level.round_number == 30)
{
sef_trig waittill("trigger", player);

sef_trig maps\_zombiemode_blockers_new::door_think();

break;
}

wait 2;
}
}

Compile, build mod & play. I'd recommend to test it using a lower round so you don't have to wait until round 30 to test it :please:

I can't be bothered to test this, so let me know if there are any issues/errors.
Last Edit: July 01, 2016, 02:07:46 pm by Koan
Marked as best answer by SefSefHD 8 years ago
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
It prob give some issues because you're still using the normal targetname as wel, so the _blockers script will just thread the door_think() function on it from the game start.
Try this: just use the targetname - door_thirty_trig and remove the script_string KVP, then use this function in your mapname.gsc like koan suggested:


Code Snippet
Plaintext
butt_stuff()
{
sef_trig = getEnt("door_thirty_trig","targetname");
sef_trig SetCursorHint("HINT_NOICON");
sef_trig UseTriggerRequireLookAt();
sef_trig SetHintString("Come back at round 30...");

while(level.round_number < 30)
{
level waittill( "between_round_over" );
}
sef_trig thread maps\_zombiemode_blockers_new::door_init();
}

broken avatar :(
×
broken avatar :(
Location: ae
Date Registered: 24 June 2016
Last active: 8 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
SefSefHD's Groups
SefSefHD's Contact & Social LinksMirdiff
:please:



Set up the door as you would normally, make sure the trigger is a trigger_use, then give the trigger the KVP "script_string" / "door_thirty_trig".

In _zombiemode.gsc, at the bottom of the main() function, add:
Code Snippet
Plaintext
level thread butt_stuff();


Then add this new function to the script:
Code Snippet
Plaintext
butt_stuff()
{
self endon("disconnect");

sef_trig = getEnt("door_thirty_trig","script_string");
sef_trig SetCursorHint("HINT_NOICON");
sef_trig UseTriggerRequireLookAt();
sef_trig SetHintString("Come back at round 30...");

cost = sef_trig.zombie_cost;

while(1)
{
if(level.round_number == 30)
{
sef_trig waittill("trigger", player);

sef_trig maps\_zombiemode_blockers_new::door_think();

break;
}

wait 2;
}
}

Compile, build mod & play. I'd recommend to test it using a lower round so you don't have to wait until round 30 to test it :please:

I can't be bothered to test this, so let me know if there are any issues/errors.

Looks pretty slick heh! Testin it out right now, Thanks alot !

broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 5 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
Koan's Contact & Social Linksh-r_Koan_my website
Looks pretty slick heh! Testin it out right now, Thanks alot !

Use BluntStuffy's alteration if it causes problems.
broken avatar :(
×
broken avatar :(
Location: ae
Date Registered: 24 June 2016
Last active: 8 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
SefSefHD's Groups
SefSefHD's Contact & Social LinksMirdiff
Could you please clarify where to place the function?

and just give me basic KVP's for the door because my setup is not working, Thank you
broken avatar :(
×
broken avatar :(
Location: kp
Date Registered: 29 July 2015
Last active: 5 years ago
Posts
435
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
children should not be playing call of duty
×
Koan's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
Koan's Contact & Social Linksh-r_Koan_my website
Could you please clarify where to place the function?

and just give me basic KVP's for the door because my setup is not working, Thank you

Did you try Stuffy's version? Do you have working doors in the first place?
broken avatar :(
×
broken avatar :(
Location: ae
Date Registered: 24 June 2016
Last active: 8 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
SefSefHD's Groups
SefSefHD's Contact & Social LinksMirdiff
Did you try Stuffy's version? Do you have working doors in the first place?

Doors open perfectly fine, but im not sure where to put the code and i tried putting it as you said and i placed the function but i just get bad syntax when launching the map
broken avatar :(
×
broken avatar :(
Location: ae
Date Registered: 24 June 2016
Last active: 8 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
SefSefHD's Groups
SefSefHD's Contact & Social LinksMirdiff
Doors open perfectly fine, but im not sure where to put the code and i tried putting it as you said and i placed the function but i just get bad syntax when launching the map

Where do i place the function?  :derp:
broken avatar :(
×
broken avatar :(
Location: ae
Date Registered: 24 June 2016
Last active: 8 years ago
Posts
25
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
SefSefHD's Groups
SefSefHD's Contact & Social LinksMirdiff
It prob give some issues because you're still using the normal targetname as wel, so the _blockers script will just thread the door_think() function on it from the game start.
Try this: just use the targetname - door_thirty_trig and remove the script_string KVP, then use this function in your mapname.gsc like koan suggested:


Code Snippet
Plaintext
butt_stuff()
{
sef_trig = getEnt("door_thirty_trig","targetname");
sef_trig SetCursorHint("HINT_NOICON");
sef_trig UseTriggerRequireLookAt();
sef_trig SetHintString("Come back at round 30...");

while(level.round_number < 30)
{
level waittill( "between_round_over" );
}
sef_trig thread maps\_zombiemode_blockers_new::door_init();
}


Thank you so much, worked like a charm!

P.S Thank you Koan aswell :)

 
Loading ...