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

Help Making Two Doors Open at the Start of a Game

broken avatar :(
Created 11 years ago
by jbird
0 Members and 1 Guest are viewing this topic.
2,400 views
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
×
jbird's Groups
I'm making a script for Der Riese and I'm trying to make it so that the two first room doors open at the start of a game. Does anyone know how to do this?
This is what I tried to script but it did nothing at all http://pastebin.com/i9PiKvMj
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 22 September 2013
Last active: 6 months ago
Posts
326
Respect
Forum Rank
Perk Hacker
Primary Group
Mapper
My Groups
More
Personal Quote
Zombie Mapper and Gamer
Signature
My Custom Zombie Maps:

- Nazi zombie Legion
- City of Hell
- The Abandoned Mine
- The Last Undead House (Finished)

more custom zombie maps coming soon
×
gamer9294's Groups
Mapper Has released one or more maps to the UGX-Mods community.
gamer9294's Contact & Social Links
Hello Jbird,


you could also try this:



Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

main()
{
level thread watch_player_first();

}

watch_player_first()
{
flag_wait( "all_players_connected" );
wait 1; //because some moments the doors will be faster open then you can see in game.
level thread do_doors_open();
}

do_doors_open()
{
door1 = getEnt("door1","targetname");
door2 = getEnt("door2","targetname");

door1 moveZ(-200, 1.5); //set here the amount of units that the door will move down |  moveX  moves on X units,  moveY moves on Y units,   moveZ moves on Z units
door2 moveZ(-200, 1.5);

wait 1.5;

door1 notsolid();
door2 notsolid();

wait 0.1;

door1 delete();
door2 delete();

}

//this is example code:
//for opening doors when the players are spawned.

this is only a example code that I have written in few minutes but, so it most working your doors.


you only need making a 2 doors with the names:

key:
Code Snippet
Plaintext
targetname
value:
Code Snippet
Plaintext
door1

key:
Code Snippet
Plaintext
targetname
value:
Code Snippet
Plaintext
door2


then you are done.


best regards,
Gamer9294
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 3 months ago
Posts
1,190
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
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.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
I believe that he's making a mod for the actually Der Riese map, not another map using the der Riese scripts. So editing kvp's  or anything in radiant for that matter. I think it's for his grief mod.
broken avatar :(
×
broken avatar :(
Location: usMissouri
Date Registered: 6 August 2013
Last active: 10 months ago
Posts
513
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
My Contact & Social Links
More
Signature
Projects:
Unnamed Project: 5%
Mutliple Downloadable Items for Mappers: (Released after map releases)
×
GerardS0406's Groups
GerardS0406's Contact & Social LinksGerardS0406GerardS0406Gerard0406MrGerard0406
I believe that he's making a mod for the actually Der Riese map, not another map using the der Riese scripts. So editing kvp's  or anything in radiant for that matter. I think it's for his grief mod.
Yea my only tip to you jbird is find the kvps for the first two doors in der riese then try his script above
Last Edit: March 15, 2015, 04:22:35 pm by GerardS0406
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
kvp's are obv going to be the same, get their origin and then activate them.
(ent.origin == (x,y,z) || ent2.origin == (x,y,z))
Edit: Wrong way
Code Snippet
Plaintext
locations = [];
locations[0] = (x,y,z);
locations[1] = (x,y,z);
doors = getentarray(whatever)
for(doors---)
{
for(x = 0; x <= 1; x++)
{
if(doors[i] = locations[x])
activate
}
}
Last Edit: March 17, 2015, 02:02:50 am by DidUknowiPwn
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 13 May 2014
Last active: 5 days ago
Posts
167
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
jbird's Groups
This is what I have right now
Code Snippet
Plaintext
openDoors()
{
flag_wait( "all_players_connected" );
 
doors = getEntArray( "zombie_door", "targetname" );
for( i = 0; i < doors.size; i++ )
if( doors[i].script_flag == "enter_outside_east" || doors[i].script_flag == "enter_outside_west" )
doors[i] delete();
 
doors_east = getEntArray( "outside_east_door", "targetname" );
for( i = 0; i < doors_east.size; i++ )
doors_east[i] delete();
 
doors_west = getEntArray( "outside_west_door", "targetname" );
for( i = 0; i < doors_west.size; i++ )
doors_west[i] delete();
 
flag_set( "enter_outside_east" );
flag_set( "enter_outside_west" );
}
But this completely gets rid of the doors. How do I make it so the doors just open like normal when the game starts?

 
Loading ...