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

Solved: Doors and Power.

broken avatar :(
Created 12 years ago
by TheCPKStudios
0 Members and 1 Guest are viewing this topic.
1,631 views
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 16 August 2013
Last active: 9 years ago
Posts
4
Respect
Forum Rank
Fresh Corpse
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
TheCPKStudios's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
TheCPKStudios's Contact & Social LinksTherazer99thecpkstudiosTheCPKStudios
Hello there everyone, my name isn't important at the moment but my question is. I have a custom zombies map that I am developing (As everyone should) and I cannot for the life of me figure out how to make a script brush model (Excuse my spelling) move to either a new spot and stay there or move then disappear. It would be greatly appreciated to whomever helps me fix this problem!

Solution (Credit to codmoddd1234: The majority of information below is from a message sent to me excluding the targetnames disclaimer)

Targetnames "cpkdoor" and "cpkstudiosdoor" may be changed but must be different from each other as they are two completely different things.

In COD5radiant:
Make a brush...right click...script...scriptbrush model
Then select the brush and press "n"
give it targetname     cpkdoor


In nazi_zombie_mapname.gsc

thread cpkstudiosdoor(); // paste this line under zombiemode::main(); in your nazi_zombie_mapname gsc located in your raw/maps folder or your launcher maps folder
///
cpkstudiosdoor()  //paste this section at the very very bottom of your nazi_zombie_mapname.gsc
{
   cpkdoor = getent( "cpkdoor", "targetname" );    ///this is the kvp for scriptbrushmodel
   flag_wait( "electricity_on" );  //this is the flag for power
   cpkdoor movez(  200, 1.5, 0 );  // .....
   //cpkdoor movex(  50, 1.5, 0 );
   //cpkdoor movey(  50, 1.5, 0 );
   //cpkdoor playsound( "packa_door_1" );
   //iprintln("secret door open")
}

For getting it on the first try....
Alternatively you could have
cpkdoor delete ();
Or
cpkdoor rotateto ((180,270,0),1.5,0.6,0.1);  //this looks very very fancy...worth trying. Lots of work went into it.
Or
Cpkdoor rotateto ( cpkdoor.angles + (0,70,0),2,.5,0);  // this would look good with another door doing this opposite direction. Like 2 gates.

There you go your first script with a few options.
You will laugh at this in a month when you realize how simple it can be to make cool levels.

Test them out
 if they work throw them into the original post and hopefully it makes someones life easier.

Here is something else simple and useful. I figured with this you would see all options and be able to edit basic stuff accordingly
example... u could add a electricity flag and make it happen with power with some modifying. Or make it happen when your level starts.
Or when someone hits it with a grenade or upgraded gun very easily.

//do  the same as before
//under zombiemode::main();
//thread cpk_letterspart1();  // part2 gets handled by part one so all u need is this.
//then paste this whole thing at the very bottom of your nazi_zombie_mapname.gsc
/////////////////////////////////////INSTRUCTIONS//////////////////////////////////////////////
//3 script brushmodels with dynamic path checked.
// with kvp
//targetname        cletter
//targetname        pletter
//targetname        kletter
//1 trigger use
// with kvp
//targetname        cpklettertrig
///////////////////////////////////////////////////////////////////////////////////////////
cpk_letterspart1()
{
   trigger = GetEnt( "cpklettertrig", "targetname" );

   if( IsDefined( trigger ) )
   {
      trigger waittill( "trigger" );
      cpk_letterspart2();
   }
}
cpk_letterspart2()
{
cletter = getent ("cletter", "targetname" );
pletter = getent ("pletter", "targetname" );
kletter = getent ("kletter", "targetname" );

cpk_dropletters (cletter);
wait 1;
cpk_dropletters (pletter);
wait 0.5;
cpk_dropletters (kletter);
}
cpk_dropletters( letter )
{
   rollAngle = RandomIntRange( 50, 190 );
   rollTime = RandomFloatRange( 0.7, 2 );
   accelTime = rollTime * 0.25;
   
   letter RotateRoll( rollAngle, rollTime, accelTime );
   wait( rollTime * 0.65 );
   
   //PlayFX( level._effect["rooftopsign_breakaway_dust"], letter.origin );  //you will eventually get to the point you want some fx.
   letter MoveGravity( ( 20, 20, -10 ), 3 );
   
   wait( 3.5 );
   letter Delete();
}
//the end :)
///////////////////////////////////////////////////////////////////////////
Last Edit: March 02, 2014, 01:20:36 pm by TheCPKStudios
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 10 years ago
Posts
2,789
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Well Debris floats away to a location that a player can't see. Doors swing open. So which one is it?

 
Loading ...